in reply to Re^2: how to check syntax of code inside a scalar?
in thread how to check syntax of code inside a scalar?
Bad idea... try it with this:
syntax_ok(qq{BEGIN { print "yay\n"; }});
and you'll see that the BEGIN block still gets run, bypassing your return statement. So I'd consider it rather unsafe.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: how to check syntax of code inside a scalar?
by snoopy (Curate) on Aug 04, 2010 at 21:55 UTC | |
by aquarium (Curate) on Aug 05, 2010 at 03:39 UTC | |
by snoopy (Curate) on Aug 05, 2010 at 05:05 UTC |
In Section
Seekers of Perl Wisdom