Permalink
Browse files

added pkg filter options

  • Loading branch information...
1 parent 1bcdeaf commit f708a1e304d681256576e2e06b95528dc25169f5 @draegtun committed Sep 24, 2010
Showing with 4 additions and 0 deletions.
  1. +4 −0 bin/cpan-outdated
View
@@ -22,6 +22,8 @@ Getopt::Long::Configure("bundling");
Getopt::Long::GetOptions(
'h|help' => \my $help,
'verbose' => \my $verbose,
+ 'p|pkg=s' => \my $just_this_pkg,
+ 'f|filter-pkg=s' => \my $filter_pkg,
'compare-changes' => \my $compare_changes,
'm|mirror=s' => \$mirror,
'I=s' => sub { die "this option was deprecated" },
@@ -58,6 +60,8 @@ sub main {
my %seen;
while (my $line = <$fh>) {
my ($pkg, $version, $dist) = split /\s+/, $line;
+ next if $just_this_pkg && $just_this_pkg ne $pkg;
+ next if $filter_pkg && $pkg !~ m/$filter_pkg/;
next if $version eq 'undef';
next if $dist =~ m{/perl-[0-9._]+\.tar\.gz$};
(my $file = $pkg) =~ s!::!/!g;

0 comments on commit f708a1e

Please sign in to comment.