in reply to Re: eval, but syntax-check only -- like perl -c
in thread eval, but syntax-check only -- like perl -c

There are intelligent ways to use B::Deparse but none of them apply to checking perl for syntactical correctness. The canonically correct way is to invoke the parser somehow whether through eval "sub { $code }" or through perl -c tempfile.txt.