hey all,

First of all, I've been playing around with PAR/pp and its an awesome tool 
(I also liked seeing my name in the acknowledgements of pp for helping to 
write the front end perlcc (even though the backend compiler is, well, 
'sub-optimal'.. thanks much ;-) )

Anyways, I stretch the whole module dependency item to the limit (with
run-time requires of modules), and I'm aware of the -M flag, but I still think
that pp/PAR could do a better job of finding dependencies, simply by:

        a) wrapping the whole script in a an anonymous sub
        b) using the perl interpreter to run all the 'startup code'
        c) extracting the evaluated module list from '%INC'.
        d) passing the results to Module::ScanDeps

Either that, or for tough cases (where modules are 'required' at runtime) 
run the script all the way to end with the arguments requested, and then
snapshotting %INC at the very point before the script would exit (by 
supplementing $SIG{__DIE__} and having a END block put at the beginning of 
the script.)

I realize that both of these items have side effects, but IMO would be
useful additions. Would patches be accepted for adding them to PAR/pp? 
Or, are they already in the works, and I just missed them?

If a patch is acceptable, what would be the best thing to patch? PAR or 
pp?

Thanks much,

Ed

Reply via email to