* Make sure $] is numeric before we use it with Module::CoreList.

* Switch from wget to curl in cpanget since wget is broken in Fedora 9.
This commit is contained in:
stevenpritchard
2008-04-25 20:18:41 +00:00
parent 0a266eb49d
commit 4825c92807
3 changed files with 15 additions and 8 deletions

View File

@@ -1,3 +1,8 @@
1.75
* Make sure $] is numeric before we use it with Module::CoreList.
* Switch from wget to curl in cpanget since wget is broken in Fedora 9.
1.74 2007-12-11 1.74 2007-12-11
* Maybe finally handle "v" in version number correctly. * Maybe finally handle "v" in version number correctly.

View File

@@ -34,7 +34,7 @@ for n in "$@" ; do
only_url=1 only_url=1
;; ;;
q) q)
quiet='-q' quiet='-s'
;; ;;
*) *)
echo "Unknown option '$arg'." echo "Unknown option '$arg'."
@@ -55,7 +55,7 @@ fi
mkdir -p $( dirname $packages ) mkdir -p $( dirname $packages )
wget $quiet -N -O $packages $CPAN/modules/$( basename $packages ) curl $quiet -R -o $packages $CPAN/modules/$( basename $packages )
for module in "$@" ; do for module in "$@" ; do
tar=$( zgrep '^'$module' ' $packages | awk '{print $3}' ) tar=$( zgrep '^'$module' ' $packages | awk '{print $3}' )
@@ -66,7 +66,7 @@ for module in "$@" ; do
fi fi
if [ $only_url -eq 0 ] ; then if [ $only_url -eq 0 ] ; then
wget $quiet -N $CPAN/authors/id/$tar curl $quiet -R -o "$( basename $tar )" $CPAN/authors/id/$tar
else else
echo "$module: $CPAN/authors/id/$tar" echo "$module: $CPAN/authors/id/$tar"
fi fi

View File

@@ -2,7 +2,7 @@
# #
# cpanspec - Generate a spec file for a CPAN module # cpanspec - Generate a spec file for a CPAN module
# #
# Copyright (C) 2004-2007 Steven Pritchard <steve@kspei.com> # Copyright (C) 2004-2008 Steven Pritchard <steve@kspei.com>
# This program is free software; you can redistribute it # This program is free software; you can redistribute it
# and/or modify it under the same terms as Perl itself. # and/or modify it under the same terms as Perl itself.
# #
@@ -10,10 +10,10 @@
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# #
# $Id: cpanspec,v 1.57 2007/10/15 18:04:11 stevenpritchard Exp $ # $Id: cpanspec,v 1.58 2008/04/25 20:18:41 stevenpritchard Exp $
our $NAME="cpanspec"; our $NAME="cpanspec";
our $VERSION='1.74'; our $VERSION='1.75';
=head1 NAME =head1 NAME
@@ -559,8 +559,10 @@ if (!$packager or $packager eq "\%packager") {
. " Please add or use --packager option.\n"; . " Please add or use --packager option.\n";
} }
die "Module::CoreList does not support perl version $]!\n" my $perl_version=$]+0;
if (!exists($Module::CoreList::version{$]}));
die "Module::CoreList does not support perl version $perl_version!\n"
if (!exists($Module::CoreList::version{$perl_version}));
my @args=@ARGV; my @args=@ARGV;
my @processed=(); my @processed=();