in reply to Stopping a package from infesting my namespace
Well, how about "mess with" instead of "mess up"? Redefine package Parse::Token::exportTo with your own replacement.
First make sure the original gets read in. Then just define it yourself. Hopefully Parse::Token doesn't do anything at compile time that requires it to be compiled in a specific order.
require Parse::Token; { # turn off warnings to avoid "Subroutine exportTo redefined" message no warnings; package Parse::Token; sub exportTo { ... } } package myPackage; ...
I don't know enough (read: anything at all) about Perse::Lex to know how much messing you can get away with, but it sounds like you've already figured out most of that. It looks like Parse::Token::exportTo() only uses object data and nothing lexically scoped in the module, so at least that won't be a limiting factor.
--Dave
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Stopping a package from infesting my namespace
by anneli (Pilgrim) on Oct 08, 2011 at 23:37 UTC | |
by armstd (Friar) on Oct 09, 2011 at 02:20 UTC | |
by anneli (Pilgrim) on Oct 09, 2011 at 03:34 UTC |
In Section
Seekers of Perl Wisdom