perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug MacEachern <>
Subject Re: global variables and reparsing question (low priority ;)
Date Thu, 01 Jun 2000 18:59:53 GMT
forget about mod_perl for a moment.  yes, true, Perl's built-in require
will not reload a module if it's already in %INC.  but that's doesn't mean
a Perl environment cannot un-cache that entry so it will be reloaded.
consider the code below, pretend that loop is a long-lifetime server,
Tk type application, vi or emacs with Perl embedded:

use Module::Reload ();

do {
    require Foo;
} while (<STDIN>);

Module::Reload checks the mtime of (and all loaded modules) on
disk, if it has changed since the last time it was require'd, it will be
reloaded.  this is perfectly valid Perl, the language supports this
feature.  i'm quite certain your code be changed to adapt to such an

View raw message