Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

26 lines (22 sloc) 0.722 kB
use strict;
use warnings;
use Getopt::Long;
use Module::Load::Conditional qw(check_install);
my $mi;
my $dzil;
my $spaces = 32;
GetOptions( 'mi' => \$mi, 'dzil' => \$dzil, 'spaces=i', \$spaces );
foreach my $module ( sort @ARGV ) {
my $href = check_install( module => $module );
next unless $href;
if ( $dzil ) {
my $join = ' ' x ( $spaces - length($module) );
print join("$join= ", $module, (defined $href->{version} ? $href->{version} : '0') ), "\n";
}
elsif ( $mi ) {
print join(' ', 'requires', qq{'$module'}, '=>', (defined $href->{version} ? qq{'$href->{version}'} : q{'0'}) ), ";\n";
}
else {
print join(',',$module,(defined $href->{version} ? $href->{version} : '')), "\n";
}
}
Jump to Line
Something went wrong with that request. Please try again.