in reply to Re: Why is perl -MO=Deparse -f obf.txt unsafe?
in thread Why is perl -MO=Deparse -f obf.txt unsafe?

Ah, BEGIN....

So is that an oversight in the B::Deparse backend module or is there a useful reason perl -c runs the BEGIN code?

Sure you show the warning in perlrun, but shouldn't there be a warning label or something on B::Deparse?
  • Comment on Re^2: Why is perl -MO=Deparse -f obf.txt unsafe?

Replies are listed 'Best First'.
Re^3: Why is perl -MO=Deparse -f obf.txt unsafe?
by LanX (Saint) on Feb 06, 2016 at 19:54 UTC
    Every use happens at begin time including the execution of import

    You can't compile without executing use and obviously you can't decompile without compiling.

    Welcome in the world of dynamic languages. :)

    Cheers Rolf
    (addicted to the Perl Programming Language and ☆☆☆☆ :)
    Je suis Charlie!

    update

    Maybe you should clarify your intentions, this smells like an XY Problem

Re^3: Why is perl -MO=Deparse -f obf.txt unsafe?
by Anonymous Monk on Feb 06, 2016 at 19:24 UTC
    Its the parser that runs BEGIN blocks, not the deparser.