http://qs1969.pair.com?node_id=203149


in reply to Check a script's module dependencies

Good idea, nice effort, and probably the same route I'd take if I hadn't picked up various details during my Perl efforts. However, there are better ways to do this. Regexing sources is easy to break and your script cannot conveniently report recursive dependencies where a module a script depends on relies on other modules itself.

I was going to post a snippet here, but thought it could be useful to more people, so I decided to post it in a more prominent spot. Check robustly list any Perl code's module dependencies for the result. Cheers :-)

Makeshifts last the longest.