in reply to Finding dependancies of a script

Here is what I think I will do. Tell me if you think this is an evil use of the command line. I made a little module named "oduleCheck", using BrowserUks idea, that looks like this:
package oduleCheck; CHECK { print "Modules required at compile time for $0:\n"; print " $_\n" for values %INC; } 1;
By calling it "oduleCheck" I can run it from the command line like this if I want to actually run the script:
perl -ModuleCheck test.pl
Or, if I want to just check the modules or I am checking a module I can run it from the command line like this:
perl -ModuleCheck -c File/Spec.pm

Replies are listed 'Best First'.
Re: Re: Finding dependancies of a script
by sauoq (Abbot) on Jul 25, 2003 at 21:38 UTC

    Cute. But 1) "ModuleCheck" isn't nearly as descriptive as "Dependencies" and 2) those of us who are used to using -M regularly would have to remember not to type -MModuleCheck, so I think it is a bit too cute.

    -sauoq
    "My two cents aren't worth a dime.";