You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Stas Bekman <st...@stason.org> on 2001/02/23 10:12:12 UTC

[bug] PerlModule reloads modules twice on start

I've noticed an inconcistency between PerlModule and use() (and
PerlRequire and require()).

When Apache starts, it immediately restarts itself to see whether it can
sustain the reload. So when you have

PerlModule Apache::Registry

you will see:

Subroutine handler redefined at
/usr/lib/perl5/site_perl/5.6.0/i386-linux/Apache/Registry.pm line 27.
Subroutine compile redefined at
/usr/lib/perl5/site_perl/5.6.0/i386-linux/Apache/Registry.pm line 174.
Subroutine parse_cmdline redefined at
/usr/lib/perl5/site_perl/5.6.0/i386-linux/Apache/Registry.pm line 190.

but if you have:

use Apache::Registry;

in startup.pl/<Perl> sections, Perl won't reload the files, since they are
already in %INC.

So it looks to me that Perl{Module|Require} directives should check %INC,
before execute the load.

This behavior is seen under Perl 5.6.x (apache 1.3.17 /mod_perl-1.25). I
think that I didn't see it under 5.005_03.

And Matt, as I've told you before that I saw:

Subroutine import redefined at
/usr/lib/perl5/site_perl/5.6.1/Apache/Reload.pm line 15.
Subroutine package_to_module redefined at
/usr/lib/perl5/site_perl/5.6.1/Apache/Reload.pm line 22.
Subroutine register_module redefined at
/usr/lib/perl5/site_perl/5.6.1/Apache/Reload.pm line 29.
Subroutine handler redefined at
/usr/lib/perl5/site_perl/5.6.1/Apache/Reload.pm line 48.

It has nothing to do with Apache::Reload.

_____________________________________________________________________
Stas Bekman              JAm_pH     --   Just Another mod_perl Hacker
http://stason.org/       mod_perl Guide  http://perl.apache.org/guide
mailto:stas@stason.org   http://apachetoday.com http://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/



RE: [bug] PerlModule reloads modules twice on start

Posted by Stathy Touloumis <st...@edventions.com>.
I noticed this behavior as well.

> I've noticed an inconcistency between PerlModule and use() (and
> PerlRequire and require()).