![]() |
|
The stupid question is the question not asked | |
PerlMonks |
finding all modules used from a scriptby d_i_r_t_y (Monk) |
on Oct 31, 2000 at 05:12 UTC ( #39224=perlquestion: print w/replies, xml ) | Need Help?? |
d_i_r_t_y has asked for the wisdom of the Perl Monks concerning the following question:
is there a way of obtaining/enumerating the names of all
modules included by a script?
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:
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
Back to
Seekers of Perl Wisdom
|
|