in reply to Re: Is strict too strict here?
in thread Is strict too strict here?

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?

Replies are listed 'Best First'.
Re^3: Is strict too strict here?
by ikegami (Patriarch) on Jul 12, 2008 at 16:21 UTC

    You don't know which variable are used in the evaled string when writing the evaled string?

    Based on your proposed solution, you'd be happy with "no strict;".