in reply to Re^4: Hacking Perl Code
in thread Hacking Perl Code
But please be aware that any BEGIN and UNITCHECK within a required module is executed, so you are only disabling CHECK and other UNITCHECKS on the top level script.
As I said, IMHO does Devel::TraceUse have the more flexible and extendable approach, because it catches all includes before they are done (and immediately printing a nested tree output)
You are parsing the (hopefully unmanipulated) entries from %INC at the top-level.
Both approaches have their pro and cons... :)
your approach is not much different from a source filter, so if you consider to release it as a use-able module you could implement it that way. But please be aware that both approaches have to deal with trailing __DATA__ and __END__ sections when appending (instead of prepending) a UNITCHECK.
Cheers Rolf
( addicted to the Perl Programming Language)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Hacking Perl Code
by Discipulus (Canon) on Apr 09, 2014 at 19:39 UTC |