summaryrefslogtreecommitdiff
path: root/Porting/core-cpan-diff
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2012-06-17 20:04:23 -0500
committerJesse Luehrs <doy@tozt.net>2012-06-17 20:04:23 -0500
commit8e188e6b5aaf51b20dad3318216a58a38b53397b (patch)
treeb33f68fc28ef6df9566d0bdd614dafb537d5d745 /Porting/core-cpan-diff
parentf5b47b4ad767eaff65339d16f4d8a1b66966bf35 (diff)
downloadperl-8e188e6b5aaf51b20dad3318216a58a38b53397b.tar.gz
use 'undef' instead of 'UNKNOWN' for -u
Diffstat (limited to 'Porting/core-cpan-diff')
-rw-r--r--Porting/core-cpan-diff8
1 files changed, 5 insertions, 3 deletions
diff --git a/Porting/core-cpan-diff b/Porting/core-cpan-diff
index 5ccf7403b2..1c47dc4eec 100644
--- a/Porting/core-cpan-diff
+++ b/Porting/core-cpan-diff
@@ -120,6 +120,8 @@ sub run {
'x|crosscheck' => \$do_crosscheck,
) or usage;
+ @wanted_upstreams = map { $_ eq 'undef' ? undef : $_ } @wanted_upstreams;
+
my @modules;
usage("Cannot mix -a with module list") if $scan_all && @ARGV;
@@ -240,13 +242,13 @@ sub do_compare {
warn "WARNING: duplicate entry for $dist in $module\n";
}
- my $upstream = $m->{UPSTREAM} || 'UNKNOWN';
+ my $upstream = $m->{UPSTREAM};
next if @$wanted_upstreams and !( $upstream ~~ $wanted_upstreams );
print $outfh "\n$module - "
. $Maintainers::Modules{$module}->{DISTRIBUTION} . "\n";
print $outfh " upstream is: "
- . ( $m->{UPSTREAM} || 'UNKNOWN!' ) . "\n";
+ . ( $m->{UPSTREAM} // 'UNKNOWN!' ) . "\n";
my $cpan_dir;
eval {
@@ -488,7 +490,7 @@ sub do_crosscheck {
my $pdist = $m->{DISTRIBUTION};
die "ERROR: $module has no DISTRIBUTION entry\n" unless defined $pdist;
- my $upstream = $m->{UPSTREAM} || 'UNKNOWN';
+ my $upstream = $m->{UPSTREAM};
next if @$wanted_upstreams and !( $upstream ~~ $wanted_upstreams );
my $cdist = $modules{$module};