Prototype mismatch: sub main::strftime

Prototype mismatch: sub main::strftime

am 26.08.2008 05:16:19 von Darragh Gammell

------=_Part_333_11567406.1219720579553
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi

I'm getting this error in my apache logs but I've no idea how to fix it. Any
help would be much appreciated.

[Tue Aug 26 10:07:55 2008] [error] [client ] Prototype mismatch: sub
main::strftime: none vs ($\\@;$) at /usr/share/perl/5.8/Exporter.pm line
66., referer: https://secure.blah.net.au/tagtag/orderform.htm
[Tue Aug 26 10:07:55 2008] [error] [client ] at
/home/secure/public_html/tagtag/send.cgi



If I execute the cgi script manually with a -w I get some more info

Subroutine main::strftime redefined at /usr/share/perl/5.8/Exporter.pm line
66.
at /home/secure/public_html/tagtag/send.cgi line 10
Prototype mismatch: sub main::strftime: none vs ($\@;$) at
/usr/share/perl/5.8/Exporter.pm line 66.
at /home/secure/public_html/tagtag/send.cgi line 10
[Tue Aug 26 13:12:21 2008] send.cgi: "my" variable $error masks earlier
declaration in same scope at /home/secure/public_html/tagtag/send.cgi line
147.
Content-Type: text/html; charset=ISO-8859-1


Top lines of the script:

#!/usr/bin/perl -w


#use strict;
use POSIX qw(strftime);
use CGI qw(:standard);
use CGI::Carp;
#use vars qw($DEBUGGING);
use Date::Parse;
use Date::Format;

use IO::Handle;
use GnuPG::Interface;
use MIME::Lite;


Lines 62-66 of Exporter.pm:

return export $pkg, $callpkg, ($args ? @_ : ()) if $heavy;
local $SIG{__WARN__} =
sub {require Carp; &Carp::carp};
# shortcut for the common case of no type character
*{"$callpkg\::$_"} = \&{"$pkg\::$_"} foreach @_;



Thanks

Darragh

------=_Part_333_11567406.1219720579553
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi

I'm getting this error in my apache logs but I've no idea how to fix it. Any help would be much appreciated.

[Tue Aug 26 10:07:55 2008] [error] [client ] Prototype mismatch: sub main::strftime: none vs ($\\@;$) at /usr/share/perl/5.8/Exporter.pm line 66., referer:

[Tue Aug 26 10:07:55 2008] [error] [client ]  at /home/secure/public_html/tagtag/send.cgi



If I execute the cgi script manually with a -w I get some more info

Subroutine main::strftime redefined at /usr/share/perl/5.8/Exporter.pm line 66.

 at /home/secure/public_html/tagtag/send.cgi line 10
Prototype mismatch: sub main::strftime: none vs ($\@;$) at /usr/share/perl/5.8/Exporter.pm line 66.
 at /home/secure/public_html/tagtag/send.cgi line 10
[Tue Aug 26 13:12:21 2008] send.cgi: "my" variable $error masks earlier declaration in same scope at /home/secure/public_html/tagtag/send.cgi line 147.

Content-Type: text/html; charset=ISO-8859-1


Top lines of the script:

#!/usr/bin/perl -w


#use strict;
use POSIX qw(strftime);
use CGI qw(:standard);
use CGI::Carp;
#use vars qw($DEBUGGING);

use Date::Parse;
use Date::Format;

use IO::Handle;
use GnuPG::Interface;
use MIME::Lite;


Lines 62-66 of Exporter.pm:

  return export $pkg, $callpkg, ($args ? @_ : ()) if $heavy;
  local $SIG{__WARN__} =

        sub {require Carp; &Carp::carp};
  # shortcut for the common case of no type character
  *{"$callpkg\::$_"} = \&{"$pkg\::$_"} foreach @_;



Thanks

Darragh







------=_Part_333_11567406.1219720579553--

Re: Prototype mismatch: sub main::strftime

am 26.08.2008 10:47:58 von torsten.foertsch

On Tue 26 Aug 2008, Darragh Gammell wrote:
> Subroutine main::strftime redefined at
> /usr/share/perl/5.8/Exporter.pm line 66.
> =A0at /home/secure/public_html/tagtag/send.cgi line 10
> Prototype mismatch: sub main::strftime: none vs ($\@;$) at
> /usr/share/perl/5.8/Exporter.pm line 66.
> =A0at /home/secure/public_html/tagtag/send.cgi line 10

I think "use Date::Format" (at line 10 in send.cgi) exports its own=20
version of strftime. That way it redefines the one exported by POSIX.=20
That leads to the "redefined" warning. Further, one of the functions=20
has a prototype while the other one hasn't. Hence comes the "prototype=20
mismatch".

Torsten

=2D-
Need professional mod_perl support?
Just hire me: torsten.foertsch@gmx.net