in reply to Re^3: Intercepting compile time blocks like BEGIN {}
in thread Intercepting compile time blocks like BEGIN {}

Using PPI removes the need to detects such attacks.

PPI can't be used when I execute the code, if PPI doesn't reliably help me finding all BEGIN Blocks in advance it's of no helpš.

Your concentrating on the "editor does syntax check" use case.

Cheers Rolf

UPDATES 1) ... when investigation foreign code.

  • Comment on Re^4: Intercepting compile time blocks like BEGIN {}

Replies are listed 'Best First'.
Re^5: Intercepting compile time blocks like BEGIN {}
by ikegami (Patriarch) on Aug 09, 2010 at 23:13 UTC

    Your concentrating on the "editor does syntax check" use case.

    Specifically, I focused the claim that it would allow "automated testing if code can be safely syntax checked without executing code" to show that it's false.

    The other use case you mentioned was the ability to trace the special blocks. Sure, that would be a good feature, but your suggested implementation of a command line switch makes no sense.

      > "automated testing if code can be safely syntax checked without executing code"

      to test if syntax-checking might execute code.

      nothing wrong!

      Cheers Rolf

        The answer to that question is practically always yes, and answering it doesn't impart any useful information.