Skip to content

Instantly share code, notes, and snippets.

@kevindawson
Created April 16, 2013 16:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kevindawson/5397248 to your computer and use it in GitHub Desktop.
Save kevindawson/5397248 to your computer and use it in GitHub Desktop.
perl version -> plv.pl
#!/usr/bin/env perl
use v5.14;
use strict;
use warnings;
our $VERSION = '0.03';
use English qw( -no_match_vars ); # Avoids regex performance penalty
local $OUTPUT_AUTOFLUSH = 1;
use CPAN;
printf("%-40s %10s %10s\n", "Module", "Installed", "CPAN");
foreach my $a (@ARGV) {
foreach my $mod (CPAN::Shell->expand("Module", $a)){
printf("%-40s %10s %10s %s\n",
$mod->id,
$mod->inst_version eq "undef" || !defined($mod->inst_version)
? "-" : $mod->inst_version,
$mod->cpan_version eq "undef" || !defined($mod->cpan_version)
? "-" : $mod->cpan_version,
$mod->uptodate ? "" : "*"
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment