You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Ted <mp...@netcasters.com> on 2006/10/13 22:02:52 UTC

Apache2::Reload warnings

Hi,

I get the following warnings when using Apache2::Reload.  How can
I get rid of them? 

Constant subroutine MyApp::MY_CONSTANT redefined at
/usr/local/lib/perl5/site_perl/5.8.6/sun4-solaris/ModPerl/Util.pm line 69.
Prototype mismatch: sub MyApp::MY_CONSTANT: none vs () at
/usr/local/lib/perl5/5.8.6/Exporter.pm line 65.
 at MyApp.pm line 6
Prototype mismatch: sub MyApp::numerically: none vs ($$) at
/usr/local/lib/perl5/5.8.6/Exporter.pm line 65.
at MyApp.pm line 6


Here is the code:
------------
MyApp.pm
------------
#!/usr/local/bin/perl

package MyApp;
use strict;
use MyLib qw(MY_CONSTANT numerically);

sub handler {
    my $r = shift @_;
    $r->content_type('text/plain');
    print "Hello\n";
    return Apache2::Const::OK;
}
1;

------------
MyLib.pm
------------
#!/usr/local/bin/perl

package MyLib;
use strict;

BEGIN {
    use Exporter ();
    our (@ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);

    @ISA       = qw(Exporter);
    @EXPORT    = qw();
    @EXPORT_OK = qw();

    %EXPORT_TAGS = (
        subs => [qw(MY_CONSTANT numerically)],
    );

    Exporter::export_ok_tags('subs');
}

use constant MY_CONSTANT => 'Test 123';

sub numerically ($$) {
    my($a, $b) = @_;
    $a <=> $b;
}
1;


Thanks,
Ted