The solution that satisfies the most is to wrap the code I want to try inside a eval "sub {$code}".
Starting with commit 0067b6c, I have been using this approach and have been most pleased with it. It will catch things like prototype mismatches which is not strictly a syntax checking thing. That may be good or bad depending on your needs.
This code: $x=1; __END__ $y= will be tagged as a syntax error when it is not. But this is not of great concern to me.
In reply to Re: How to do perl -c inside perl?
by rockyb
in thread How to do perl -c inside perl?
by rockyb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |