Unusing modules
Stas Bekman
stas at stason.org
Wed Nov 12 17:27:18 CST 2003
Brendon Oliver wrote:
> On Tue, 11 Nov 2003 12:14 pm, Rick Measham wrote:
>
>>I have a CPAN module loaded (PDF::API2) that appears not to work too
>>well creating multiple PDFs. It appears that if I could unload the
>>module somehow, I'd be fine. I could trace through it all, but if
>>anyone's ever looked at the innards of PDF they'd see that I'm
>>screwed :)
>>
>>Is it possible to get perl to destroy the currently used module and
>>then use it again?
>>
>>Yes, I'm hoping for some sort of hack and I know its not really the
>>right way to do it, but I need something quick at the moment :)
>
>
> Not sure if this will work, but using the Symbol::Table module you can
> redefine symbol table contents. Perhaps you could redefine (to undef?) or
> delete the symbol table entries for the module in question, then reload it
> via "require"?
Look at Apache::PerlRun in the modperl distro, that's exactly what it does.
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas at stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
More information about the Melbourne-pm
mailing list