Unusing modules

Brendon Oliver brendon.oliver at redsheriff.com
Mon Nov 10 20:02:28 CST 2003


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"?

Just guessing really...

Cheers,

- Brendon.

-- 

R E D S H E R I F F
Brendon Oliver
[brendon.oliver at redsheriff.com]

96-98 Market Street        +61 3 8606 4035 tel
South Melbourne VIC 3025   +61 3 8606 4001 fax
Australia                  +61 411 048 342 mob

This message and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. If 
you are not the intended recipient, you are hereby notified that any use or 
dissemination of this communication is strictly prohibited. If you have 
received this message in error please notify us immediately by return email 
or telephone +61 (3) 659 0432, then delete this message. Any views expressed 
in this message
are those of the individual sender and many not necessarily reflect
the views of Red Sheriff.
---
Van Roy's Law:
	An unbreakable toy is useful for breaking other toys.

 12:58:34 up 20:37,  5 users,  load average: 0.26, 0.47, 0.43





More information about the Melbourne-pm mailing list