develooper Front page | perl.perl5.porters | Postings from May 2008

Re: Script/Module dependencies

Thread Previous | Thread Next
From:
H.Merijn Brand
Date:
May 6, 2008 03:09
Subject:
Re: Script/Module dependencies
Message ID:
20080506120921.4c39d5f6@pc09.procura.nl
On Mon, 5 May 2008 22:39:49 -0600 (MDT), alfie@share-house.com.au wrote:

> Hi list,
> 
> Is there a nice way to get a list of modules a script/module is dependent
> on? FWIW:
> 
>   "perl -r script.pl" (for requires), or even "perl --show-dependencies
> script.pl" would do:
> 
>   load_all_use_statements();
>   use Data::Dumper; print Dumper({%INC});
>   exit;
> 
> Alfie
> 

Devel::Modlist might be helpful too:


Devel::Modlist(3)     User Contributed Perl Documentation    Devel::Modlist(3)

NAME
       Devel::Modlist - Perl extension to collect module use information

SYNOPSIS
           perl -d:Modlist script.pl

-- 
H.Merijn Brand         Amsterdam Perl Mongers (http://amsterdam.pm.org/)
using & porting perl 5.6.2, 5.8.x, 5.10.x  on HP-UX 10.20, 11.00, 11.11,
& 11.23, SuSE 10.1 & 10.2, AIX 5.2, and Cygwin.       http://qa.perl.org
http://mirrors.develooper.com/hpux/            http://www.test-smoke.org
                        http://www.goldmark.org/jeff/stupid-disclaimers/

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About