in reply to Re: Acme::PerlMonkify %-}
in thread Acme::PerlMonkify %-}

Just out of curiosity I did just that. Perl complained thusly:

which is pretty much as I would expect. The resultant code looks like this:

The really interesting part is if you now re-run the module on another piece of Perl...

I'm not sure this was the desired effect...


Peter @ Berghold . Net

Sieze the cow! Bite the day!

Test the code? We don't need to test no stinkin' code! All code posted here is as is where is unless otherwise stated.

Brewer of Belgian style Ales

Replies are listed 'Best First'.
Re: Re: Re: Acme::PerlMonkify %-}
by diotalevi (Canon) on Jul 28, 2003 at 18:51 UTC

    Its a bit of a problem getting this to run on itself (thanks for the reminder on why I didn't do this). Much of the set up work happens at BEGIN time (everything in import()) which then sets up a later CHECK block which produces the text and prints it to the previously tied STDOUT which just redirects the text back into the original file. The thing is - you really are evalling the same code twice in that case and perl isn't terribly nice to deal with in that case. It worked on the scripts I tried it on, I am interested in other failure modes since that's actually a fault of the underlying B::Deobfuscate and I'd want to fix it to cover the patch.

    I did however, change the 'use vars()' to some our() declared variables. Hmm... and how to fix that one...

      Could you run it on a copy of itself (no perl here. i'll have to try it in the morning).

      ___________
      Eric Hodges