in reply to Re: Finding dependancies of a script
in thread Finding dependancies of a script
First, you don't need sub there. Second, you don't need die or exit. Third, you want to run it with -c on the command line.
I think. I didn't actually test any of that... :-)
Update: Ok, I've tested it now. The code:
And a test run (on a test script that consisted of a single line, "use CGI;"):package Dependencies; CHECK { print $_, $/ for values %INC; } 1;
$ perl -MDependencies -c ./test.pl /usr/lib/perl5/5.8.0/warnings/register.pm /usr/lib/perl5/5.8.0/Carp.pm Dependencies.pm /usr/lib/perl5/5.8.0/vars.pm /usr/lib/perl5/5.8.0/strict.pm /usr/lib/perl5/5.8.0/Exporter.pm /usr/lib/perl5/5.8.0/constant.pm /usr/lib/perl5/5.8.0/warnings.pm /usr/lib/perl5/5.8.0/CGI/Util.pm /usr/lib/perl5/5.8.0/overload.pm /usr/lib/perl5/5.8.0/CGI.pm ./test.pl syntax OK
-sauoq "My two cents aren't worth a dime.";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Finding dependancies of a script
by BrowserUk (Patriarch) on Jul 25, 2003 at 22:22 UTC | |
by sauoq (Abbot) on Jul 25, 2003 at 23:30 UTC | |
by BrowserUk (Patriarch) on Jul 25, 2003 at 23:48 UTC | |
by sauoq (Abbot) on Jul 26, 2003 at 00:42 UTC |