-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplv
More file actions
executable file
·35 lines (26 loc) · 752 Bytes
/
plv
File metadata and controls
executable file
·35 lines (26 loc) · 752 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env perl
use v5.14;
use strict;
use warnings FATAL => 'all';
use Carp::Always::Color;
our $VERSION = '0.03';
use English qw( -no_match_vars ); # Avoids regex performance penalty
local $OUTPUT_AUTOFLUSH = 1;
use CPAN;
printf("%-50s %10s %10s\n", "Module", "Installed", "CPAN");
foreach my $argument (@ARGV) {
say $argument;
my $mod;
foreach $mod (CPAN::Shell->expand("Module", $argument)) {
my $install_module = "-";
$install_module = $mod->inst_version if defined($mod->inst_version);
printf(
"%-50s %10s %10s %s\n",
$mod->id,
$install_module,
$mod->cpan_version eq "undef"
|| !defined($mod->cpan_version) ? "-" : $mod->cpan_version,
$mod->uptodate ? "" : "*"
);
}
}