Created
February 20, 2010 05:05
-
-
Save gfx/309508 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/cpan-outdated b/cpan-outdated | |
| index fdb9331..9daa3ee 100755 | |
| --- a/cpan-outdated | |
| +++ b/cpan-outdated | |
| @@ -42,11 +42,14 @@ sub main { | |
| my $inst_version = MM->parse_version($path); | |
| $inst_version =~ s/\s+//; # workaround for Attribute::Params::Validate | |
| if ($inst_version ne $version && CPAN::Version->vlt($inst_version, $version)) { | |
| - next if $seen{$dist}++; | |
| + my $name = $dist; | |
| + $name =~ s{.+/}{}; # remove PAUSE ID | |
| + $name =~ s{-v?\d+\..+$}{}; # remove version and suffix | |
| + next if $seen{$name}++; | |
| if ($verbose) { | |
| printf "%-30s %-7s %-7s %s\n", $pkg, $inst_version, $version, $dist; | |
| } else { | |
| - print "$dist\n"; | |
| + print "$pkg\n"; | |
| } | |
| } | |
| last SCAN_INC; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment