in reply to Reloading changed modules
The same technique, except that it copes with your "${package}::FIELDS" (which $symref in the snippet above is a reference to).if ($mtime > $Stat{$file}) { delete $INC{$key}; # warn "Reloading $key\n"; if (my $symref = $UndefFields{$key}) { # warn "undeffing fields\n"; no strict 'refs'; undef %{$symref}; } require $key; warn("Apache::Reload: process $$ reloading $key\n") if $DEBUG; } $Stat{$file} = $mtime;
Update: Clarified final note.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Reloading changed modules
by castaway (Parson) on Dec 21, 2002 at 17:41 UTC | |
by grantm (Parson) on Dec 21, 2002 at 18:48 UTC | |
by castaway (Parson) on Dec 21, 2002 at 19:40 UTC | |
by castaway (Parson) on Dec 21, 2002 at 19:58 UTC | |
by castaway (Parson) on Dec 21, 2002 at 18:55 UTC | |
by demerphq (Chancellor) on Dec 21, 2002 at 20:42 UTC |