http://qs1969.pair.com?node_id=854180


in reply to Re: Testing if Perl Code is Valid - but don't execute!
in thread Testing if Perl Code is Valid - but don't execute!

Even with executing the BEGIN block, you still only have a 50% success rate. :)

For more examples like this, check my seminal classic On Parsing Perl.

-- Randal L. Schwartz, Perl hacker

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.