What it does is to compile a file's content given as parameter within an eval after prepending a UNITCHECK block which is executed right after compilation and exits right away.
Within this block the required (resp used) modules are parsed from the keys of %INC.
But the author is overly optimistic about parsing code without executing it. It was already mentioned that BEGIN blocks are executed at compile time, additionally does every use execute an import function.
And much more magic ...
Cheers Rolf
( addicted to the Perl Programming Language)
In reply to Re: Hacking Perl Code
by LanX
in thread Hacking Perl Code
by carlriz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |