epoptai has asked for the wisdom of the Perl Monks concerning the following question:
I recently added a script called MODULATOR (updated) to the catacombs and have a question about the unexpected results of one of its functions. When viewing POD this script optionally puts the example code from the "synopsis" section into a form so it can be tested using eval. This works well most of the time but the Acme brand of modules is causing problems. If the example code from say Acme::Bleach:
is evaluated, the modulator script is wiped out and replaced with the output of Bleach, namely a file full of invisible characters with "use Acme::Bleach" at the top, and it ceases to function at all.use Acme::Bleach; print "Hello world";
- Is there a way to prevent this unfortunate outcome besides preventing certain naughty modules from the eval?
- Are there any other modules besides the Acme brand that involve this kind of danger to the invoking script?
--
Check out my Perlmonks Related Scripts like framechat,
reputer, and xNN.
|
---|
Replies are listed 'Best First'. | |
---|---|
•Re: when eval corrupts the invoker
by merlyn (Sage) on Jun 24, 2002 at 23:40 UTC | |
by epoptai (Curate) on Jun 25, 2002 at 03:48 UTC | |
Re: when eval corrupts the invoker
by toma (Vicar) on Jun 25, 2002 at 07:27 UTC | |
Re: when eval corrupts the invoker
by Mr. Muskrat (Canon) on Jun 25, 2002 at 02:32 UTC | |
Re: when eval corrupts the invoker
by perigeeV (Hermit) on Jun 25, 2002 at 16:27 UTC |
Back to
Seekers of Perl Wisdom