Just another Perl shrine | |
PerlMonks |
Re^2: Is strict too strict here?by saintmike (Vicar) |
on Jul 12, 2008 at 00:21 UTC ( [id://697120]=note: print w/replies, xml ) | Need Help?? |
Fix: Foo::eval_this('our $somevar; print $somevar;');Yeah, that would work, but that's unfortunately not an option, since I don't know beforehand which variables are used in the eval'd string (well, I guess I could walk main's symbol table and figure out all the declared globals, then add "our $this; our $that" in front of the string, but that's rather ugly. Any other ideas?
In Section
Seekers of Perl Wisdom
|
|