=head1 NAME
-Porting/sync-with-cpan
+Porting/sync-with-cpan - Synchronize with CPAN distributions
=head1 SYNOPSIS
my $package_url = "http://www.cpan.org/modules/$package";
my $package_file = "/tmp/$package";
+my @problematic = (
+ 'podlators', # weird CUSTOMIZED section due to .PL files
+);
+
GetOptions ('tarball=s' => \my $tarball,
'version=s' => \my $version,
my $distribution = $$info {DISTRIBUTION};
my @files = glob $$info {FILES};
-if (!-d $files [0]) {
+if (!-d $files [0] || grep { $_ eq $module } @problematic) {
say "This looks like a setup $0 cannot handle (yet)";
unless ($force) {
say "Will not continue without a --force option";
last if $file =~ s/^$key/$val/;
}
}
+ else {
+ $file = $files[0] . '/' . $file;
+ }
if ( $file =~ m{^cpan/} ) {
$file =~ s{^cpan/}{};
if (!$found) {
if ($in_mod_section) {
if (/DISTRIBUTION/) {
- if (s/\Q$old_version/$version/) {
+ if (s/\Q$old_version/$new_version/) {
$found = 1;
}
}