in reply to How to find the perl module's dependency modules ?

These are a few of my favorite things:

#!/usr/local/bin/perl use strict; use warnings; use CPAN::FindDependencies; use ExtUtils::MakeMaker qw(prompt); my $mod = prompt("Enter module name: "); my @dependencies = CPAN::FindDependencies::finddeps($mod); foreach my $dep (@dependencies) { print ' ' x $dep->depth(); print $dep->name().' ('.$dep->distribution().")\n"; }
And this:

#!/usr/local/bin/perl use strict; use warnings; use B::PerlReq; use ExtUtils::MakeMaker qw(prompt); my $mod = prompt("Enter path to .pm: "); my $prereq = system("perl -MO=PerlReq -d $mod"); print "$prereq\n";
And this:

#!/usr/local/bin/perl use strict; use warnings; use ExtUtils::MakeMaker qw(prompt); my $mod = prompt("Enter module name: "); my $info = system("module_info -a $mod"); print "$info\n";

Replies are listed 'Best First'.
Re^2: How to find the perl module's dependency modules ?
by vinoth.ree (Monsignor) on Aug 08, 2009 at 08:08 UTC

    Thanks ! I used first one.