Beefy Boxes and Bandwidth Generously Provided by pair Networks
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??


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;".

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://697120]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (6)
As of 2024-03-28 16:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found