From 4825c92807a55e3430ad9194d0943ea3adf1c769 Mon Sep 17 00:00:00 2001 From: stevenpritchard Date: Fri, 25 Apr 2008 20:18:41 +0000 Subject: [PATCH] * 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. --- Changes | 5 +++++ cpanget | 6 +++--- cpanspec | 12 +++++++----- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/Changes b/Changes index 89945c9..a4523ac 100644 --- a/Changes +++ b/Changes @@ -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 * Maybe finally handle "v" in version number correctly. diff --git a/cpanget b/cpanget index bbcc559..936643f 100755 --- a/cpanget +++ b/cpanget @@ -34,7 +34,7 @@ for n in "$@" ; do only_url=1 ;; q) - quiet='-q' + quiet='-s' ;; *) echo "Unknown option '$arg'." @@ -55,7 +55,7 @@ fi 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 tar=$( zgrep '^'$module' ' $packages | awk '{print $3}' ) @@ -66,7 +66,7 @@ for module in "$@" ; do fi if [ $only_url -eq 0 ] ; then - wget $quiet -N $CPAN/authors/id/$tar + curl $quiet -R -o "$( basename $tar )" $CPAN/authors/id/$tar else echo "$module: $CPAN/authors/id/$tar" fi diff --git a/cpanspec b/cpanspec index 77944dc..2bca2dd 100755 --- a/cpanspec +++ b/cpanspec @@ -2,7 +2,7 @@ # # cpanspec - Generate a spec file for a CPAN module # -# Copyright (C) 2004-2007 Steven Pritchard +# Copyright (C) 2004-2008 Steven Pritchard # This program is free software; you can redistribute it # 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 # 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 $VERSION='1.74'; +our $VERSION='1.75'; =head1 NAME @@ -559,8 +559,10 @@ if (!$packager or $packager eq "\%packager") { . " Please add or use --packager option.\n"; } -die "Module::CoreList does not support perl version $]!\n" - if (!exists($Module::CoreList::version{$]})); +my $perl_version=$]+0; + +die "Module::CoreList does not support perl version $perl_version!\n" + if (!exists($Module::CoreList::version{$perl_version})); my @args=@ARGV; my @processed=();