Loading ...
Sorry, an error occurred while loading the content.

Re: Prototype mismatch

Expand Messages
  • Joshua Chamas
    ... I don t know exactly the problem here. I might see if its something that only occurs under $^W = 1, and might turn that off site wide with PerlWarn Off
    Message 1 of 5 , Jan 8, 2002
    • 0 Attachment
      Philip Mak wrote:
      >
      > Does anyone know what this message in my error log means?
      >
      > [Sun Jan 6 08:48:38 2002] [notice] Accept mutex: sysvsem (Default: sysvsem)
      > Prototype mismatch: sub Apache::ASP::Compiles::_home_shoujoai_global_global_asax3923adc3e76bb3f58ab02b2d54297b4d::time2str (;$) vs ($;$$) at /usr/lib/perl5/5.6.1/Exporter.pm line 57.
      > at /home/shoujoai/global/global.asa line 5
      >
      > Line 5 in global.asa says "use Date::Format;". There aren't any errors that
      > actually occur, but that error message shows up in the error_log every so
      > often.
      >

      I don't know exactly the problem here. I might see if its something
      that only occurs under $^W = 1, and might turn that off site wide with

      PerlWarn Off

      But I would be sure to enable "use strict;" cross site too like:

      PerlSetVar UseStrict 1

      the latter which is Apache::ASP specific.

      The notes for this error from "perldoc perldiag" are as follows:

      Prototype mismatch: %s vs %s
      (S) The subroutine being declared or defined had
      previously been declared or defined with a different
      function prototype.

      But I am not sure if that leads to any clear fix ... perhaps
      Exporter was not being used correctly by the module in question?

      --Josh
      _________________________________________________________________
      Joshua Chamas Chamas Enterprises Inc.
      NodeWorks Founder Huntington Beach, CA USA
      http://www.nodeworks.com 1-714-625-4051

      ---------------------------------------------------------------------
      To unsubscribe, e-mail: asp-unsubscribe@...
      For additional commands, e-mail: asp-help@...
    • Philip Mak
      ... I found the problem. I m using both HTTP::Date and Date::Format. Both of these modules export the time2str function by default, but their versions of
      Message 2 of 5 , Jan 8, 2002
      • 0 Attachment
        On Tue, Jan 08, 2002 at 01:10:06PM -0800, Joshua Chamas wrote:
        > > Does anyone know what this message in my error log means?
        > >
        > > [Sun Jan 6 08:48:38 2002] [notice] Accept mutex: sysvsem (Default: sysvsem)
        > > Prototype mismatch: sub Apache::ASP::Compiles::_home_shoujoai_global_global_asax3923adc3e76bb3f58ab02b2d54297b4d::time2str (;$) vs ($;$$) at /usr/lib/perl5/5.6.1/Exporter.pm line 57.
        > > at /home/shoujoai/global/global.asa line 5

        I found the problem. I'm using both HTTP::Date and Date::Format. Both
        of these modules export the time2str function by default, but their
        versions of time2str do different things and have different function
        prototypes.

        Kind of messy; I'm guessing it's not possible to include a module and
        tell it not to export a specific function, if it's already exporting
        that function by default...

        ---------------------------------------------------------------------
        To unsubscribe, e-mail: asp-unsubscribe@...
        For additional commands, e-mail: asp-help@...
      • Joshua Chamas
        ... Try require HTTP::Date; to load the module, but without importing its default functions. To use a module not only loads it, but calls its import()
        Message 3 of 5 , Jan 8, 2002
        • 0 Attachment
          Philip Mak wrote:
          >
          > On Tue, Jan 08, 2002 at 01:10:06PM -0800, Joshua Chamas wrote:
          > > > Does anyone know what this message in my error log means?
          > > >
          > > > [Sun Jan 6 08:48:38 2002] [notice] Accept mutex: sysvsem (Default: sysvsem)
          > > > Prototype mismatch: sub Apache::ASP::Compiles::_home_shoujoai_global_global_asax3923adc3e76bb3f58ab02b2d54297b4d::time2str (;$) vs ($;$$) at /usr/lib/perl5/5.6.1/Exporter.pm line 57.
          > > > at /home/shoujoai/global/global.asa line 5
          >
          > I found the problem. I'm using both HTTP::Date and Date::Format. Both
          > of these modules export the time2str function by default, but their
          > versions of time2str do different things and have different function
          > prototypes.
          >
          > Kind of messy; I'm guessing it's not possible to include a module and
          > tell it not to export a specific function, if it's already exporting
          > that function by default...
          >

          Try "require HTTP::Date;" to load the module, but without importing its
          default functions. To "use" a module not only loads it, but calls
          its import() method as well which is responsible for method defs getting
          exported from its namespace when using Exporter.

          --Josh
          _________________________________________________________________
          Joshua Chamas Chamas Enterprises Inc.
          NodeWorks Founder Huntington Beach, CA USA
          http://www.nodeworks.com 1-714-625-4051

          ---------------------------------------------------------------------
          To unsubscribe, e-mail: asp-unsubscribe@...
          For additional commands, e-mail: asp-help@...
        • Csongor Fagyal
          Hi, I am having some strange ASP errors: on one ASP page I am getting document contains no data messages. In the logs I see: Prototype mismatch: sub
          Message 4 of 5 , Dec 19, 2002
          • 0 Attachment
            Hi,

            I am having some strange ASP errors: on one ASP page I am getting
            "document contains no data" messages. In the logs I see:

            Prototype mismatch: sub Apache::ASP::str2time ($;$) vs none at
            /home/www/xxxxxx/xxxxx.pl line 14
            Prototype mismatch: sub Apache::ASP::str2time ($;$) vs none at
            /home/www/xxxxxx/xxxxx.pl line 14
            Prototype mismatch: sub Apache::ASP::str2time ($;$) vs none at
            /home/www/xxxxxx/xxxxx.pl line 14
            [...]
            repeated many times.

            I have an included (require-d) this xxxxx.pl script which does this:

            BEGIN {
            do "/something.pl";
            };


            use strict;

            use Time::Local;
            use lib $PATH_LIB;
            use somethingelse;
            use somethingelse2;
            use somethingelse3;
            use Date::Parse; <- this is which have str2time, this is line 14
            use Data::Dumper;



            In the logs I also have "Attempt to free non-existent shared string" and
            then the string (which is in fact a HTML page).


            I must have mixed up something totally. Any ideas on these artifacts?

            - Cs.



            ---------------------------------------------------------------------
            To unsubscribe, e-mail: asp-unsubscribe@...
            For additional commands, e-mail: asp-help@...
          Your message has been successfully submitted and would be delivered to recipients shortly.