| [reply] |
| [reply] |
Which demonstrates your vi-gnorance ... as I wrote Emacs doesn't have this problem.
| [reply] |
Every perl editor which tries to check for compile time errors and warnings (Komodo, Padre, emacs with flyspell using perl -c, vi?) need to put use Safe upfront, and no Safe at the end of the BEGIN or the begin of INIT.
This cannot be done within Perl generally as users need to execute BEGIN blocks, just not in editors.
The only remaining problem with Safe is then XS code, which might get executed at compile-time and cannot be checked for harm. | [reply] |
| [reply] |
| [reply] |
Hi Reini
I'm not sure what you mean... the editor should parse the code for all occurrences of BEGIN, CHECK and UNITCKECK and wrap each block with "use Safe" and "no Safe"?
Regarding the described problems to parse for such blocks I have no idea how to achieve this reliably withot adding a hook to Perl's parser.
Please see Intercepting compile time blocks like BEGIN {} for more detailed description of what I mean.
| [reply] |