Prototype mismatch: sub main::strftime - modperl

This is a discussion on Prototype mismatch: sub main::strftime - modperl ; 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 ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Prototype mismatch: sub main::strftime

  1. Prototype mismatch: sub main::strftime

    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


  2. Re: Prototype mismatch: sub main::strftime

    On Tue 26 Aug 2008, Darragh Gammell wrote:
    > 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


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

    Torsten

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


+ Reply to Thread