Created
November 29, 2010 03:28
-
-
Save miyagawa/719553 to your computer and use it in GitHub Desktop.
This file contains 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
commit d810f0e09325f9ee927f1c262720de28d7c19865 | |
Author: Tatsuhiko Miyagawa <miyagawa@bulknews.net> | |
Date: Sun Nov 28 19:25:38 2010 -0800 | |
Support -p|--print-package option for cpanm version tracking | |
diff --git a/bin/cpan-outdated b/bin/cpan-outdated | |
old mode 100644 | |
new mode 100755 | |
index c96d106..8ff43e1 | |
--- a/bin/cpan-outdated | |
+++ b/bin/cpan-outdated | |
@@ -25,6 +25,7 @@ Getopt::Long::GetOptions( | |
'verbose' => \my $verbose, | |
'compare-changes' => \my $compare_changes, | |
'm|mirror=s' => \$mirror, | |
+ 'p|print-package' => \my $print_package, | |
'I=s' => sub { die "this option was deprecated" }, | |
'l|local-lib=s' => \$local_lib, | |
'L|local-lib-contained=s' => | |
@@ -93,6 +94,8 @@ sub main { | |
next if $seen{$dist}++; | |
if ($verbose) { | |
printf "%-30s %-7s %-7s %s\n", $pkg, $inst_version, $version, $dist; | |
+ } elsif ($print_package) { | |
+ print "$pkg\n"; | |
} else { | |
print "$dist\n"; | |
} | |
@@ -265,9 +268,12 @@ cpan-outdated - detect outdated CPAN modules in your environment | |
=head1 SYNOPSIS | |
- # print list of outdated modules | |
+ # print the list of distribution that contains outdated modules | |
% cpan-outdated | |
+ # print the list of outdated modules in packages | |
+ % cpan-outdated -p | |
+ | |
# verbose | |
% cpan-outdated --verbose | |
@@ -289,11 +295,22 @@ cpan-outdated - detect outdated CPAN modules in your environment | |
=head1 DESCRIPTION | |
-This module print list of outdated CPAN modules in your machine. | |
+This script prints the list of outdated CPAN modules in your machine. | |
+ | |
+It's same feature of 'CPAN::Shell->r', but C<cpan-outdated> is much faster and uses less memory. | |
+ | |
+This script can be integrated with L<cpanm> command. | |
+ | |
+=head1 PRINTING PACKAGES VS DISTRIBUTIONS | |
-It's same feature of 'CPAN::Shell->r', but cpan-outdated is so fast and less memory. | |
+This script by default prints the outdated distribution as in the CPAN | |
+distro format, i.e: C<A/AU/AUTHOR/Distribution-Name-0.10.tar.gz> so | |
+you can pipe into CPAN installers, but with C<-p> option it can be | |
+twaked to print the module's package names. | |
-This script can integrate with cpanm command. | |
+For some tools such as L<cpanm> installing from packages could be a | |
+bit more useful since you can track to see the old version number | |
+where you upgrade from. | |
=head1 DEPENDENCIES | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment