use constant UNTAR_DIR => 'untarred';
use constant DIFF_CMD => 'diff';
-use constant WGET_CMD => 'wget';
sub usage {
print STDERR "\n@_\n\n" if @_;
-d/--diff Display file differences using diff(1), rather than just
listing which files have changed.
- The diff(1) command is assumed to be in your PATH.
--diffopts Options to pass to the diff command. Defaults to '-u'.
Must be run from the root of the perl source tree.
Module names must match the keys of %Modules in Maintainers.pl.
+
+The diff(1) command is assumed to be in your PATH and is used to diff files
+regardless of whether the --diff option has been chosen to display any file
+differences.
HERE
exit(1);
}
'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;
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 {
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};
if ( -f $download_file and !-s $download_file ) {
- # wget can leave a zero-length file on failed download
+ # failed download might leave a zero-length file
unlink $download_file;
}
my $path = catfile( $untar_dir, $filename );
$path =~ s/\.tar\.gz$//
+ or $path =~ s/\.tgz$//
or $path =~ s/\.zip$//
or die
"ERROR: downloaded file does not have a recognised suffix: $path\n";