in reply to Hacking Perl Code
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)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Hacking Perl Code
by Discipulus (Canon) on Apr 09, 2014 at 07:49 UTC | |
by LanX (Saint) on Apr 09, 2014 at 10:48 UTC | |
by Discipulus (Canon) on Apr 09, 2014 at 11:39 UTC | |
by LanX (Saint) on Apr 09, 2014 at 17:06 UTC | |
by Discipulus (Canon) on Apr 09, 2014 at 19:39 UTC |