d_i_r_t_y has asked for the wisdom of the Perl Monks concerning the following question:
the idea is to call a polymorphic Flush_All_Caches -like method on a hierachy of related objects whose implementing modules are dynamically included at runtime via eval "require ThisModule";. these modules are used by multiple scripts and run under mod_perl, so the basic idea was to only include modules as they are needed in order to save valuable memory (and take a small speed hit...). ie:
foreach my $class ( enumerate_loaded_classes() ) { $class->can('clean_up') || next; $class->clean_up(); }
Ideally, it would be great to be able to dynamically unload large modules after they have served their purpose. the closest solution to this i know of is to set Apache up with a moderately low MaxRequestsPerChild to expire the oldest and fattest apache children.
d_i_r_t_y
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: finding all modules used from a script
by btrott (Parson) on Oct 31, 2000 at 05:49 UTC | |
|
Re: finding all modules used from a script
by chromatic (Archbishop) on Oct 31, 2000 at 06:13 UTC | |
by AgentM (Curate) on Oct 31, 2000 at 06:42 UTC | |
|
Re: finding all modules used from a script
by btrott (Parson) on Oct 31, 2000 at 06:30 UTC | |
|
RE: finding all modules used from a script
by extremely (Priest) on Oct 31, 2000 at 07:30 UTC |