Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: scope of "use strict"? (needed: "superstrict")by davido (Cardinal) |
on Jul 07, 2005 at 04:57 UTC ( [id://473025]=note: print w/replies, xml ) | Need Help?? |
I don't fully understand why you would want to force modules to be compiled under strictures when they weren't designed to do so. As others have pointed out, this has the potential of generating lots of errors, and many of them will point to perfectly legitimate code, since it's possible to create bug-free code that isn't strict-compliant. But I thought it sounded like a fun little challenge, so in the spirit of "give them what they ask for" here is a little snippet that will test-compile every module in the dependancy heirarchy of your script with strictures enforced:
This snippet requires Devel::Modlist, and IO::CaptureOutput. They aren't core, so you'll probably have to install them. Then run it like this:
Then examine what you get in output.log. Every module that is strictures-compliant, and that is otherwise free from compiletime problems will compile "ok", and every module that isn't will give you a bunch of error messages. Enjoy! Dave
In Section
Seekers of Perl Wisdom
|
|