r39518 - in /branches/upstream/libwww-curl-perl/current: ./ inc/Module/ inc/Module/Install/ lib/WWW/ lib/WWW/Curl/ t/ template/

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Wed Jul 8 20:29:00 UTC 2009


Author: jawnsy-guest
Date: Wed Jul  8 20:28:54 2009
New Revision: 39518

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=39518
Log:
[svn-upgrade] Integrating new upstream version, libwww-curl-perl (4.08)

Modified:
    branches/upstream/libwww-curl-perl/current/Changes
    branches/upstream/libwww-curl-perl/current/Curl.xs
    branches/upstream/libwww-curl-perl/current/META.yml
    branches/upstream/libwww-curl-perl/current/Makefile.PL
    branches/upstream/libwww-curl-perl/current/README
    branches/upstream/libwww-curl-perl/current/SIGNATURE
    branches/upstream/libwww-curl-perl/current/inc/Module/Install.pm
    branches/upstream/libwww-curl-perl/current/inc/Module/Install/Base.pm
    branches/upstream/libwww-curl-perl/current/inc/Module/Install/Can.pm
    branches/upstream/libwww-curl-perl/current/inc/Module/Install/External.pm
    branches/upstream/libwww-curl-perl/current/inc/Module/Install/MakeMaker.pm
    branches/upstream/libwww-curl-perl/current/inc/Module/Install/Makefile.pm
    branches/upstream/libwww-curl-perl/current/inc/Module/Install/Metadata.pm
    branches/upstream/libwww-curl-perl/current/lib/WWW/Curl.pm
    branches/upstream/libwww-curl-perl/current/lib/WWW/Curl/Easy.pm
    branches/upstream/libwww-curl-perl/current/t/01basic.t
    branches/upstream/libwww-curl-perl/current/template/Easy.pm.tmpl

Modified: branches/upstream/libwww-curl-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-curl-perl/current/Changes?rev=39518&op=diff
==============================================================================
--- branches/upstream/libwww-curl-perl/current/Changes (original)
+++ branches/upstream/libwww-curl-perl/current/Changes Wed Jul  8 20:28:54 2009
@@ -1,4 +1,11 @@
-Revision history for Perl extension WWW::Curl.
+Revision history for the Perl binding of libcurl, WWW::Curl.
+4.08 Tue Jul 07 2009: - Balint Szilakszi <szbalint at cpan.org>
+
+    - Fixed a memory leak in setopt.
+    - Added a check to Makefile.PL for the minimum libcurl version.
+    - Mentioned WWW::Curl hosting on github.
+    - Upgraded bundled Module::Install to 0.91.
+
 4.07 Sun May 31 2009: - Balint Szilakszi <szbalint at cpan.org>
 
     - Fixed >32bit integer option passing to libcurl on 32bit systems.

Modified: branches/upstream/libwww-curl-perl/current/Curl.xs
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-curl-perl/current/Curl.xs?rev=39518&op=diff
==============================================================================
--- branches/upstream/libwww-curl-perl/current/Curl.xs (original)
+++ branches/upstream/libwww-curl-perl/current/Curl.xs Wed Jul  8 20:28:54 2009
@@ -830,6 +830,7 @@
 	           	char* pv = SvOK(value) ? SvPV(value, dummy) : "";
 	           	I32 len = (I32)dummy;
 	           	pv = savepvn(pv, len);
+			if (self->strings[option-10000] != NULL) Safefree(self->strings[option-10000]);
 			self->strings[option-10000] = pv;
 			if (self->strings_index < option - 10000) self->strings_index = option - 10000;
 			RETVAL = curl_easy_setopt(self->curl, option, SvOK(value) ? pv : NULL);

Modified: branches/upstream/libwww-curl-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-curl-perl/current/META.yml?rev=39518&op=diff
==============================================================================
--- branches/upstream/libwww-curl-perl/current/META.yml (original)
+++ branches/upstream/libwww-curl-perl/current/META.yml Wed Jul  8 20:28:54 2009
@@ -6,7 +6,7 @@
 configure_requires:
   ExtUtils::MakeMaker: 6.50
 distribution_type: module
-generated_by: 'Module::Install version 0.81'
+generated_by: 'Module::Install version 0.91'
 license: 'MPL or MIT/X-derivate'
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -20,4 +20,4 @@
     - template
 requires:
   perl: 5.6.1
-version: 4.07
+version: 4.08

Modified: branches/upstream/libwww-curl-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-curl-perl/current/Makefile.PL?rev=39518&op=diff
==============================================================================
--- branches/upstream/libwww-curl-perl/current/Makefile.PL (original)
+++ branches/upstream/libwww-curl-perl/current/Makefile.PL Wed Jul  8 20:28:54 2009
@@ -23,6 +23,16 @@
 
 my $curl_config = $ENV{CURL_CONFIG} || 'curl-config';
 
+my $vernum = `${curl_config} --vernum`; chomp $vernum;
+my $version = `${curl_config} --version`; chomp $version;
+
+if ($vernum <= "070a08") {
+	print	"Your currently installed libcurl version - $version - is too old.\n".
+		"This module doesn't seek compatibility with versions older than 7.10.8\n".
+		"Proceed manually if you know what you're doing.\n";
+	exit(0);
+}
+
 my @includes = qw();
 my ($cflags,$lflags, $ldflags) = ('','','');
 
@@ -41,10 +51,10 @@
 		../curl/include
 	);
 }
+
 #
 # Get curl to tell us where it is, if we can.
 #
-
 
 if ($^O ne 'MSWin32') {
 	$cflags = `${curl_config} --cflags`;

Modified: branches/upstream/libwww-curl-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-curl-perl/current/README?rev=39518&op=diff
==============================================================================
--- branches/upstream/libwww-curl-perl/current/README (original)
+++ branches/upstream/libwww-curl-perl/current/README Wed Jul  8 20:28:54 2009
@@ -1,6 +1,6 @@
 README for Perl extension WWW::Curl
 
-The perl module WWW::Curl provides an interface to the cURL library "libcurl".
+The Perl module WWW::Curl provides an interface to the cURL library "libcurl".
 See http://curl.haxx.se/ for more information on cURL and libcurl.
 
 This module requires libcurl and the corresponding headerfiles to be
@@ -50,12 +50,15 @@
 
 Curl multi support has been added by Sebastian Riedel <sri at oook.de>
 
-The current maintainer is Cris Bailiff <c.bailiff+curl at devsecure.com>
+The current maintainer is Cris Bailiff <c.bailiff+curl at devsecure.com> and
+Bálint Szilakszi <szbalint at cpan.org>
 
-The latest version can be downloaded from http://curl.haxx.se/libcurl/perl/ or
-found on CPAN as the module WWW::Curl
+The latest version is available on CPAN and can be downloaded from
+http://search.cpan.org/perldoc?WWW::Curl .
+
+The source code repository is available at http://github.com/szbalint/WWW--Curl/tree .
  
-Copyright (C) 2000-2005, 2008 Daniel Stenberg, Cris Bailiff , et al.  
+Copyright (C) 2000-2005, 2008-2009 Daniel Stenberg, Cris Bailiff, Bálint Szilakszi, et al.  
 You may opt to use, copy, modify, merge, publish, distribute and/or sell
 copies of the Software, and permit persons to whom the Software is
 furnished to do so, under the terms of the MPL or the MIT/X-derivate 

Modified: branches/upstream/libwww-curl-perl/current/SIGNATURE
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-curl-perl/current/SIGNATURE?rev=39518&op=diff
==============================================================================
--- branches/upstream/libwww-curl-perl/current/SIGNATURE (original)
+++ branches/upstream/libwww-curl-perl/current/SIGNATURE Wed Jul  8 20:28:54 2009
@@ -14,28 +14,28 @@
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
-SHA1 3eaacfd02186062a36432d49fe55736404c4f927 Changes
-SHA1 1e14dddfdfb8255f50be4c82b21dda67d755ee3a Curl.xs
+SHA1 51ad3a1da39f9328e5a58e7ea58faf1809cae37d Changes
+SHA1 0fc80fc01c6850ac1999bc9dbb156e65cbb3f9e5 Curl.xs
 SHA1 94cbea5b3fb940e25cd4535d1c81bfd7d51dac3c LICENSE
 SHA1 9da6d1654f2d8f05677f40f40b0d9b4b755974e9 MANIFEST
-SHA1 f17c0bd99e5432f2e8ccef8157d18a0570f8e93a META.yml
-SHA1 0925c498455cacf86c3ddd2018bd8483a202fdfd Makefile.PL
-SHA1 d748092a930511edbcc59a3e84e5a60fb8eb25e9 README
+SHA1 c17292f592664432bf4dc2c6e61b0ccda1aa0c29 META.yml
+SHA1 21b18676424631aa9290d7432d4405f9f90e2618 Makefile.PL
+SHA1 66e1c652fecb2223bb94d4a7f726458be8ee65d8 README
 SHA1 ed6f9f399075307a33bd02902ebbadbbbfbd8bab README.Win32
-SHA1 0ee138b692d09ede5107b5e90fcb0559c14ccf00 inc/Module/Install.pm
-SHA1 85ada888142a3992433fa164ed103afc5f4b88a0 inc/Module/Install/Base.pm
-SHA1 74f79103450ad44d6e9cd3deffb1cd5bdee4f047 inc/Module/Install/Can.pm
-SHA1 6339c952618b1251b6160fb419206682c64b0c26 inc/Module/Install/External.pm
-SHA1 0b2c068f052002ff4df14479ac409399082de694 inc/Module/Install/MakeMaker.pm
-SHA1 b444632abd605e508a89a21af4690226a2ac92a9 inc/Module/Install/Makefile.pm
-SHA1 0436aa3e436884a3ce9f5a3edc4c3482cd4aaf1f inc/Module/Install/Metadata.pm
-SHA1 eb0303d98939bfcd7f3412ac563c82c3721fda42 lib/WWW/Curl.pm
-SHA1 3ab482bda9bc0713981ddf1d47948ed85451b9e3 lib/WWW/Curl/Easy.pm
+SHA1 fd5f3c4f0418efee3b9b16cf8c3902e8374909df inc/Module/Install.pm
+SHA1 7cd7c349afdf3f012e475507b1017bdfa796bfbd inc/Module/Install/Base.pm
+SHA1 ba186541bbf6439111f01fc70769cf24d22869bf inc/Module/Install/Can.pm
+SHA1 a9d6306080cee9c32b18f6cbd3c7636ece67e81a inc/Module/Install/External.pm
+SHA1 dbec1085a29a855202ee797a5bac319cf426827f inc/Module/Install/MakeMaker.pm
+SHA1 3e83972921d54198d1246f7278f08664006cd65d inc/Module/Install/Makefile.pm
+SHA1 12bf1867955480d47d5171a9e9c6a96fabe0b58f inc/Module/Install/Metadata.pm
+SHA1 586dde74b4cc4c38e1e2964d9b88262e3eea75d8 lib/WWW/Curl.pm
+SHA1 a01ce19e970559a2a0de89c1f129efebbc18a1c7 lib/WWW/Curl/Easy.pm
 SHA1 3fc2f9b503827e28b96c4ea49034039b7f23ab20 lib/WWW/Curl/Form.pm
 SHA1 0bddc700447a50dd26d13119ee60349556ce1811 lib/WWW/Curl/Multi.pm
 SHA1 bcf4bc64399691f1871b9592ced73ce5fef86fea lib/WWW/Curl/Share.pm
 SHA1 802cb1fcd35fe78e4cdb10164a05e54ce1427543 t/00constants.t
-SHA1 63798ef74199b69b88a3acc3bf8d90790655daed t/01basic.t
+SHA1 a34d7760468a36938f50296161c72795700c9ab3 t/01basic.t
 SHA1 07b63b1baca142a0e34e79633d0eb57684524bed t/02callbacks.t
 SHA1 905c848deb6492d539c5bdf89c49632a412af15a t/04abort-test.t
 SHA1 f9c842503835908a0687ab41655042a16b8b5112 t/05progress.t
@@ -65,13 +65,13 @@
 SHA1 20ec0bd03ff2600505d38623153a6eb3087b5814 t/new/README
 SHA1 ac25bfa56d36f19cbee72a968b06372e88602a61 t/pod-coverage.t
 SHA1 0190346d7072d458c8a10a45c19f86db641dcc48 t/pod.t
-SHA1 87bb2a86f20e8c77371c0305840210272c91de4d template/Easy.pm.tmpl
+SHA1 63982a513b23059699c6f4a782f59cc6a2479c2b template/Easy.pm.tmpl
 SHA1 b4841adcad866b70d9d72f171d3d0f8f9d5b3c79 template/Share.pm.tmpl
 SHA1 468b011caaf4d54609b421027d7c6262a9260e89 typemap
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.9 (GNU/Linux)
 
-iEYEARECAAYFAkoi04QACgkQ+22TSbOiiI9BHQCgoD+vvx4PHW248lEWv3U0Yefn
-BXEAoIuQHWqtZP8VXeE/lzOHz4RHD/OT
-=czCF
+iEYEARECAAYFAkpTjsIACgkQ+22TSbOiiI/e6QCgouYHzVfh8AiC8Zqttg3pgQ7V
+W6cAoKUWPjIzy8HY4EEypupDZKsqrkfq
+=22o5
 -----END PGP SIGNATURE-----

Modified: branches/upstream/libwww-curl-perl/current/inc/Module/Install.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-curl-perl/current/inc/Module/Install.pm?rev=39518&op=diff
==============================================================================
--- branches/upstream/libwww-curl-perl/current/inc/Module/Install.pm (original)
+++ branches/upstream/libwww-curl-perl/current/inc/Module/Install.pm Wed Jul  8 20:28:54 2009
@@ -17,12 +17,10 @@
 #     3. The ./inc/ version of Module::Install loads
 # }
 
-BEGIN {
-	require 5.004;
-}
+use 5.005;
 use strict 'vars';
 
-use vars qw{$VERSION};
+use vars qw{$VERSION $MAIN};
 BEGIN {
 	# All Module::Install core packages now require synchronised versions.
 	# This will be used to ensure we don't accidentally load old or
@@ -30,7 +28,10 @@
 	# This is not enforced yet, but will be some time in the next few
 	# releases once we can make sure it won't clash with custom
 	# Module::Install extensions.
-	$VERSION = '0.81';
+	$VERSION = '0.91';
+
+	# Storage for the pseudo-singleton
+	$MAIN    = undef;
 
 	*inc::Module::Install::VERSION = *VERSION;
 	@inc::Module::Install::ISA     = __PACKAGE__;
@@ -93,6 +94,7 @@
 
 
 
+
 # Build.PL was formerly supported, but no longer is due to excessive
 # difficulty in implementing every single feature twice.
 if ( $0 =~ /Build.PL$/i ) { die <<"END_DIE" }
@@ -131,14 +133,22 @@
 	$sym->{$cwd} = sub {
 		my $pwd = Cwd::cwd();
 		if ( my $code = $sym->{$pwd} ) {
-			# delegate back to parent dirs
+			# Delegate back to parent dirs
 			goto &$code unless $cwd eq $pwd;
 		}
 		$$sym =~ /([^:]+)$/ or die "Cannot autoload $who - $sym";
-		unless ( uc($1) eq $1 ) {
-			unshift @_, ( $self, $1 );
-			goto &{$self->can('call')};
+		my $method = $1;
+		if ( uc($method) eq $method ) {
+			# Do nothing
+			return;
+		} elsif ( $method =~ /^_/ and $self->can($method) ) {
+			# Dispatch to the root M:I class
+			return $self->$method(@_);
 		}
+
+		# Dispatch to the appropriate plugin
+		unshift @_, ( $self, $1 );
+		goto &{$self->can('call')};
 	};
 }
 
@@ -163,6 +173,9 @@
 	delete $INC{"$self->{file}"};
 	delete $INC{"$self->{path}.pm"};
 
+	# Save to the singleton
+	$MAIN = $self;
+
 	return 1;
 }
 
@@ -176,8 +189,7 @@
 
 	my @exts = @{$self->{extensions}};
 	unless ( @exts ) {
-		my $admin = $self->{admin};
-		@exts = $admin->load_all_extensions;
+		@exts = $self->{admin}->load_all_extensions;
 	}
 
 	my %seen;
@@ -260,7 +272,7 @@
 sub load_extensions {
 	my ($self, $path, $top) = @_;
 
-	unless ( grep { !ref $_ and lc $_ eq lc $self->{prefix} } @INC ) {
+	unless ( grep { ! ref $_ and lc $_ eq lc $self->{prefix} } @INC ) {
 		unshift @INC, $self->{prefix};
 	}
 
@@ -341,7 +353,7 @@
 	if ( $] >= 5.006 ) {
 		open( FH, '<', $_[0] ) or die "open($_[0]): $!";
 	} else {
-		open( FH, "< $_[0]"  ) or die "open($_[0]): $!";	
+		open( FH, "< $_[0]"  ) or die "open($_[0]): $!";
 	}
 	my $string = do { local $/; <FH> };
 	close FH or die "close($_[0]): $!";
@@ -372,7 +384,7 @@
 	if ( $] >= 5.006 ) {
 		open( FH, '>', $_[0] ) or die "open($_[0]): $!";
 	} else {
-		open( FH, "> $_[0]"  ) or die "open($_[0]): $!";	
+		open( FH, "> $_[0]"  ) or die "open($_[0]): $!";
 	}
 	foreach ( 1 .. $#_ ) {
 		print FH $_[$_] or die "print($_[0]): $!";

Modified: branches/upstream/libwww-curl-perl/current/inc/Module/Install/Base.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-curl-perl/current/inc/Module/Install/Base.pm?rev=39518&op=diff
==============================================================================
--- branches/upstream/libwww-curl-perl/current/inc/Module/Install/Base.pm (original)
+++ branches/upstream/libwww-curl-perl/current/inc/Module/Install/Base.pm Wed Jul  8 20:28:54 2009
@@ -1,7 +1,11 @@
 #line 1
 package Module::Install::Base;
 
-$VERSION = '0.81';
+use strict 'vars';
+use vars qw{$VERSION};
+BEGIN {
+	$VERSION = '0.91';
+}
 
 # Suspend handler for "redefined" warnings
 BEGIN {
@@ -9,54 +13,56 @@
 	$SIG{__WARN__} = sub { $w };
 }
 
-### This is the ONLY module that shouldn't have strict on
-# use strict;
-
-#line 41
+#line 42
 
 sub new {
-    my ($class, %args) = @_;
-
-    foreach my $method ( qw(call load) ) {
-        *{"$class\::$method"} = sub {
-            shift()->_top->$method(@_);
-        } unless defined &{"$class\::$method"};
-    }
-
-    bless( \%args, $class );
+	my $class = shift;
+	unless ( defined &{"${class}::call"} ) {
+		*{"${class}::call"} = sub { shift->_top->call(@_) };
+	}
+	unless ( defined &{"${class}::load"} ) {
+		*{"${class}::load"} = sub { shift->_top->load(@_) };
+	}
+	bless { @_ }, $class;
 }
 
 #line 61
 
 sub AUTOLOAD {
-    my $self = shift;
-    local $@;
-    my $autoload = eval { $self->_top->autoload } or return;
-    goto &$autoload;
+	local $@;
+	my $func = eval { shift->_top->autoload } or return;
+	goto &$func;
 }
 
-#line 76
+#line 75
 
-sub _top { $_[0]->{_top} }
+sub _top {
+	$_[0]->{_top};
+}
 
-#line 89
+#line 90
 
 sub admin {
-    $_[0]->_top->{admin} or Module::Install::Base::FakeAdmin->new;
+	$_[0]->_top->{admin}
+	or
+	Module::Install::Base::FakeAdmin->new;
 }
 
-#line 101
+#line 106
 
 sub is_admin {
-    $_[0]->admin->VERSION;
+	$_[0]->admin->VERSION;
 }
 
 sub DESTROY {}
 
 package Module::Install::Base::FakeAdmin;
 
-my $Fake;
-sub new { $Fake ||= bless(\@_, $_[0]) }
+my $fake;
+
+sub new {
+	$fake ||= bless(\@_, $_[0]);
+}
 
 sub AUTOLOAD {}
 
@@ -69,4 +75,4 @@
 
 1;
 
-#line 146
+#line 154

Modified: branches/upstream/libwww-curl-perl/current/inc/Module/Install/Can.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-curl-perl/current/inc/Module/Install/Can.pm?rev=39518&op=diff
==============================================================================
--- branches/upstream/libwww-curl-perl/current/inc/Module/Install/Can.pm (original)
+++ branches/upstream/libwww-curl-perl/current/inc/Module/Install/Can.pm Wed Jul  8 20:28:54 2009
@@ -2,16 +2,16 @@
 package Module::Install::Can;
 
 use strict;
-use Module::Install::Base;
-use Config              ();
-use File::Spec          ();
-use ExtUtils::MakeMaker ();
+use Config                ();
+use File::Spec            ();
+use ExtUtils::MakeMaker   ();
+use Module::Install::Base ();
 
-use vars qw{$VERSION $ISCORE @ISA};
+use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.81';
+	$VERSION = '0.91';
+	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
-	@ISA     = qw{Module::Install::Base};
 }
 
 # check if we can load some module

Modified: branches/upstream/libwww-curl-perl/current/inc/Module/Install/External.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-curl-perl/current/inc/Module/Install/External.pm?rev=39518&op=diff
==============================================================================
--- branches/upstream/libwww-curl-perl/current/inc/Module/Install/External.pm (original)
+++ branches/upstream/libwww-curl-perl/current/inc/Module/Install/External.pm Wed Jul  8 20:28:54 2009
@@ -4,11 +4,11 @@
 # Provides dependency declarations for external non-Perl things
 
 use strict;
-use Module::Install::Base;
+use Module::Install::Base ();
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.81';
+	$VERSION = '0.91';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }

Modified: branches/upstream/libwww-curl-perl/current/inc/Module/Install/MakeMaker.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-curl-perl/current/inc/Module/Install/MakeMaker.pm?rev=39518&op=diff
==============================================================================
--- branches/upstream/libwww-curl-perl/current/inc/Module/Install/MakeMaker.pm (original)
+++ branches/upstream/libwww-curl-perl/current/inc/Module/Install/MakeMaker.pm Wed Jul  8 20:28:54 2009
@@ -2,14 +2,14 @@
 package Module::Install::MakeMaker;
 
 use strict;
-use Module::Install::Base;
-use ExtUtils::MakeMaker ();
+use ExtUtils::MakeMaker   ();
+use Module::Install::Base ();
 
-use vars qw{$VERSION $ISCORE @ISA};
+use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.81';
+	$VERSION = '0.91';
+	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
-	@ISA     = qw{Module::Install::Base};
 }
 
 my $makefile;

Modified: branches/upstream/libwww-curl-perl/current/inc/Module/Install/Makefile.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-curl-perl/current/inc/Module/Install/Makefile.pm?rev=39518&op=diff
==============================================================================
--- branches/upstream/libwww-curl-perl/current/inc/Module/Install/Makefile.pm (original)
+++ branches/upstream/libwww-curl-perl/current/inc/Module/Install/Makefile.pm Wed Jul  8 20:28:54 2009
@@ -2,14 +2,14 @@
 package Module::Install::Makefile;
 
 use strict 'vars';
-use Module::Install::Base;
-use ExtUtils::MakeMaker ();
-
-use vars qw{$VERSION $ISCORE @ISA};
+use ExtUtils::MakeMaker   ();
+use Module::Install::Base ();
+
+use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.81';
+	$VERSION = '0.91';
+	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
-	@ISA     = qw{Module::Install::Base};
 }
 
 sub Makefile { $_[0] }
@@ -114,17 +114,32 @@
 	my $self = shift;
 	die "&Makefile->write() takes no arguments\n" if @_;
 
-	# Make sure we have a new enough
+	# Check the current Perl version
+	my $perl_version = $self->perl_version;
+	if ( $perl_version ) {
+		eval "use $perl_version; 1"
+			or die "ERROR: perl: Version $] is installed, "
+			. "but we need version >= $perl_version";
+	}
+
+	# Make sure we have a new enough MakeMaker
 	require ExtUtils::MakeMaker;
 
-	# MakeMaker can complain about module versions that include
-	# an underscore, even though its own version may contain one!
-	# Hence the funny regexp to get rid of it.  See RT #35800
-	# for details.
-
-	$self->configure_requires( 'ExtUtils::MakeMaker' => $ExtUtils::MakeMaker::VERSION =~ /^(\d+\.\d+)/ );
-
-	# Generate the
+	if ( $perl_version and $self->_cmp($perl_version, '5.006') >= 0 ) {
+		# MakeMaker can complain about module versions that include
+		# an underscore, even though its own version may contain one!
+		# Hence the funny regexp to get rid of it.  See RT #35800
+		# for details.
+		$self->build_requires( 'ExtUtils::MakeMaker' => $ExtUtils::MakeMaker::VERSION =~ /^(\d+\.\d+)/ );
+		$self->configure_requires( 'ExtUtils::MakeMaker' => $ExtUtils::MakeMaker::VERSION =~ /^(\d+\.\d+)/ );
+	} else {
+		# Allow legacy-compatibility with 5.005 by depending on the
+		# most recent EU:MM that supported 5.005.
+		$self->build_requires( 'ExtUtils::MakeMaker' => 6.42 );
+		$self->configure_requires( 'ExtUtils::MakeMaker' => 6.42 );
+	}
+
+	# Generate the MakeMaker params
 	my $args = $self->makemaker_args;
 	$args->{DISTNAME} = $self->name;
 	$args->{NAME}     = $self->module_name || $self->name;
@@ -133,7 +148,7 @@
 	if ( $self->tests ) {
 		$args->{test} = { TESTS => $self->tests };
 	}
-	if ($] >= 5.005) {
+	if ( $] >= 5.005 ) {
 		$args->{ABSTRACT} = $self->abstract;
 		$args->{AUTHOR}   = $self->author;
 	}
@@ -147,7 +162,7 @@
 		delete $args->{SIGN};
 	}
 
-	# merge both kinds of requires into prereq_pm
+	# Merge both kinds of requires into prereq_pm
 	my $prereq = ($args->{PREREQ_PM} ||= {});
 	%$prereq = ( %$prereq,
 		map { @$_ }
@@ -250,4 +265,4 @@
 
 __END__
 
-#line 379
+#line 394

Modified: branches/upstream/libwww-curl-perl/current/inc/Module/Install/Metadata.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-curl-perl/current/inc/Module/Install/Metadata.pm?rev=39518&op=diff
==============================================================================
--- branches/upstream/libwww-curl-perl/current/inc/Module/Install/Metadata.pm (original)
+++ branches/upstream/libwww-curl-perl/current/inc/Module/Install/Metadata.pm Wed Jul  8 20:28:54 2009
@@ -2,18 +2,17 @@
 package Module::Install::Metadata;
 
 use strict 'vars';
-use Module::Install::Base;
+use Module::Install::Base ();
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.81';
-	@ISA     = qw{Module::Install::Base};
+	$VERSION = '0.91';
+	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }
 
 my @boolean_keys = qw{
 	sign
-	mymeta
 };
 
 my @scalar_keys = qw{
@@ -440,21 +439,21 @@
 	/ixms ) {
 		my $license_text = $1;
 		my @phrases      = (
-			'under the same (?:terms|license) as perl itself' => 'perl',        1,
-			'GNU general public license'                      => 'gpl',         1,
-			'GNU public license'                              => 'gpl',         1,
-			'GNU lesser general public license'               => 'lgpl',        1,
-			'GNU lesser public license'                       => 'lgpl',        1,
-			'GNU library general public license'              => 'lgpl',        1,
-			'GNU library public license'                      => 'lgpl',        1,
-			'BSD license'                                     => 'bsd',         1,
-			'Artistic license'                                => 'artistic',    1,
-			'GPL'                                             => 'gpl',         1,
-			'LGPL'                                            => 'lgpl',        1,
-			'BSD'                                             => 'bsd',         1,
-			'Artistic'                                        => 'artistic',    1,
-			'MIT'                                             => 'mit',         1,
-			'proprietary'                                     => 'proprietary', 0,
+			'under the same (?:terms|license) as (?:perl|the perl programming language) itself' => 'perl', 1,
+			'GNU general public license'         => 'gpl',         1,
+			'GNU public license'                 => 'gpl',         1,
+			'GNU lesser general public license'  => 'lgpl',        1,
+			'GNU lesser public license'          => 'lgpl',        1,
+			'GNU library general public license' => 'lgpl',        1,
+			'GNU library public license'         => 'lgpl',        1,
+			'BSD license'                        => 'bsd',         1,
+			'Artistic license'                   => 'artistic',    1,
+			'GPL'                                => 'gpl',         1,
+			'LGPL'                               => 'lgpl',        1,
+			'BSD'                                => 'bsd',         1,
+			'Artistic'                           => 'artistic',    1,
+			'MIT'                                => 'mit',         1,
+			'proprietary'                        => 'proprietary', 0,
 		);
 		while ( my ($pattern, $license, $osi) = splice(@phrases, 0, 3) ) {
 			$pattern =~ s{\s+}{\\s+}g;
@@ -506,17 +505,29 @@
 	}
 }
 
+sub test_requires_from {
+	my $self     = shift;
+	my $content  = Module::Install::_readperl($_[0]);
+	my @requires = $content =~ m/^use\s+([^\W\d]\w*(?:::\w+)*)\s+([\d\.]+)/mg;
+	while ( @requires ) {
+		my $module  = shift @requires;
+		my $version = shift @requires;
+		$self->test_requires( $module => $version );
+	}
+}
+
 # Convert triple-part versions (eg, 5.6.1 or 5.8.9) to
 # numbers (eg, 5.006001 or 5.008009).
 # Also, convert double-part versions (eg, 5.8)
 sub _perl_version {
 	my $v = $_[-1];
-	$v =~ s/^([1-9])\.([1-9]\d?\d?)$/sprintf("%d.%03d",$1,$2)/e;	
+	$v =~ s/^([1-9])\.([1-9]\d?\d?)$/sprintf("%d.%03d",$1,$2)/e;
 	$v =~ s/^([1-9])\.([1-9]\d?\d?)\.(0|[1-9]\d?\d?)$/sprintf("%d.%03d%03d",$1,$2,$3 || 0)/e;
 	$v =~ s/(\.\d\d\d)000$/$1/;
 	$v =~ s/_.+$//;
 	if ( ref($v) ) {
-		$v = $v + 0; # Numify
+		# Numify
+		$v = $v + 0;
 	}
 	return $v;
 }
@@ -526,21 +537,56 @@
 
 
 ######################################################################
-# MYMETA.yml Support
+# MYMETA Support
 
 sub WriteMyMeta {
 	die "WriteMyMeta has been deprecated";
 }
 
-sub write_mymeta {
-	my $self = shift;
-	
-	# If there's no existing META.yml there is nothing we can do
-	return unless -f 'META.yml';
+sub write_mymeta_yaml {
+	my $self = shift;
 
 	# We need YAML::Tiny to write the MYMETA.yml file
 	unless ( eval { require YAML::Tiny; 1; } ) {
 		return 1;
+	}
+
+	# Generate the data
+	my $meta = $self->_write_mymeta_data or return 1;
+
+	# Save as the MYMETA.yml file
+	print "Writing MYMETA.yml\n";
+	YAML::Tiny::DumpFile('MYMETA.yml', $meta);
+}
+
+sub write_mymeta_json {
+	my $self = shift;
+
+	# We need JSON to write the MYMETA.json file
+	unless ( eval { require JSON; 1; } ) {
+		return 1;
+	}
+
+	# Generate the data
+	my $meta = $self->_write_mymeta_data or return 1;
+
+	# Save as the MYMETA.yml file
+	print "Writing MYMETA.json\n";
+	Module::Install::_write(
+		'MYMETA.json',
+		JSON->new->pretty(1)->canonical->encode($meta),
+	);
+}
+
+sub _write_mymeta_data {
+	my $self = shift;
+
+	# If there's no existing META.yml there is nothing we can do
+	return undef unless -f 'META.yml';
+
+	# We need Parse::CPAN::Meta to load the file
+	unless ( eval { require Parse::CPAN::Meta; 1; } ) {
+		return undef;
 	}
 
 	# Merge the perl version into the dependencies
@@ -558,7 +604,7 @@
 	}
 
 	# Load the advisory META.yml file
-	my @yaml = YAML::Tiny::LoadFile('META.yml');
+	my @yaml = Parse::CPAN::Meta::LoadFile('META.yml');
 	my $meta = $yaml[0];
 
 	# Overwrite the non-configure dependency hashs
@@ -572,9 +618,7 @@
 		$meta->{build_requires} = { map { @$_ } @{ $val->{build_requires} } };
 	}
 
-	# Save as the MYMETA.yml file
-	print "Writing MYMETA.yml\n";
-	YAML::Tiny::DumpFile('MYMETA.yml', $meta);	
+	return $meta;
 }
 
 1;

Modified: branches/upstream/libwww-curl-perl/current/lib/WWW/Curl.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-curl-perl/current/lib/WWW/Curl.pm?rev=39518&op=diff
==============================================================================
--- branches/upstream/libwww-curl-perl/current/lib/WWW/Curl.pm (original)
+++ branches/upstream/libwww-curl-perl/current/lib/WWW/Curl.pm Wed Jul  8 20:28:54 2009
@@ -6,7 +6,7 @@
 use DynaLoader;
 
 BEGIN {
-    $VERSION = '4.07';
+    $VERSION = '4.08';
     @ISA     = qw(DynaLoader);
     __PACKAGE__->bootstrap;
 }
@@ -275,15 +275,20 @@
 
 =head1 USAGE CASES
 
-The standard Perl WWW module, LWP should be used in most cases to work with
-HTTP or FTP from Perl. However, there are some cases where LWP doesn't
-perform well. One is speed and the other is parallelism. WWW::Curl is much faster,
-uses much less CPU cycles and it's capable of non-blocking parallel requests.
+WWW::Curl is a thin binding on top of libcurl, to make using libcurl possible from Perl land.
+Because of this, the module is less like Perl and more like C in coding style.
+
+There is a new module, L<http://search.cpan.org/perldoc?WWW::Curl::Simple>,
+which wraps this module into a more Perlish and userfriendly package.
+
+The standard Perl WWW module, LWP should probably be used in most cases to work with HTTP or FTP from Perl.
+However, there are some cases where LWP doesn't perform well. One is speed and the other is parallelism. 
+WWW::Curl is much faster, uses much less CPU cycles and it's capable of non-blocking parallel requests.
 
 In some cases, for example when building a web crawler, cpu usage and parallel downloads are
 important considerations. It can be desirable to use WWW::Curl to do the heavy-lifting of
 a large number of downloads and wrap the resulting data into a Perl-friendly structure by
-HTTP::Response.
+HTTP::Response or use WWW::Curl::Simple to do that for you.
 
 =head1 CHANGES
 
@@ -340,4 +345,8 @@
 
 =head1 SEE ALSO
 
-http://curl.haxx.se
+L<http://curl.haxx.se>
+
+L<http://search.cpan.org/perldoc?WWW::Curl::Simple>
+
+The development source code is also available: L<http://github.com/szbalint/WWW--Curl/tree/master>

Modified: branches/upstream/libwww-curl-perl/current/lib/WWW/Curl/Easy.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-curl-perl/current/lib/WWW/Curl/Easy.pm?rev=39518&op=diff
==============================================================================
--- branches/upstream/libwww-curl-perl/current/lib/WWW/Curl/Easy.pm (original)
+++ branches/upstream/libwww-curl-perl/current/lib/WWW/Curl/Easy.pm Wed Jul  8 20:28:54 2009
@@ -5,7 +5,7 @@
 use Carp;
 use vars qw($VERSION @ISA @EXPORT @EXPORT_OK $AUTOLOAD);
 
-$VERSION = '4.07';
+$VERSION = '4.08';
 
 require WWW::Curl;
 require Exporter;

Modified: branches/upstream/libwww-curl-perl/current/t/01basic.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-curl-perl/current/t/01basic.t?rev=39518&op=diff
==============================================================================
--- branches/upstream/libwww-curl-perl/current/t/01basic.t (original)
+++ branches/upstream/libwww-curl-perl/current/t/01basic.t Wed Jul  8 20:28:54 2009
@@ -10,7 +10,6 @@
 my $url = $ENV{CURL_TEST_URL} || "http://www.google.com";
 
 
-my $memfile = '';
 # Init the curl session
 my $curl = WWW::Curl::Easy->new();
 ok($curl, 'Curl session initialize returns something');
@@ -20,7 +19,7 @@
 ok(! $curl->setopt(CURLOPT_FOLLOWLOCATION, 1), "Setting CURLOPT_FOLLOWLOCATION");
 ok(! $curl->setopt(CURLOPT_TIMEOUT, 30), "Setting CURLOPT_TIMEOUT");
 ok(! $curl->setopt(CURLOPT_ENCODING, undef), "Setting CURLOPT_ENCODING to undef");
-ok(! $curl->setopt(CURLOPT_RESUME_FROM_LARGE, 0), "Setting CURLOPT_ENCODING to undef");
+ok(! $curl->setopt(CURLOPT_RESUME_FROM_LARGE, 0), "Setting CURLOPT_RESUME_FROM_LARGE to 0");
 $curl->setopt(CURLOPT_HEADER, 1);
 
 my $head = tempfile();

Modified: branches/upstream/libwww-curl-perl/current/template/Easy.pm.tmpl
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-curl-perl/current/template/Easy.pm.tmpl?rev=39518&op=diff
==============================================================================
--- branches/upstream/libwww-curl-perl/current/template/Easy.pm.tmpl (original)
+++ branches/upstream/libwww-curl-perl/current/template/Easy.pm.tmpl Wed Jul  8 20:28:54 2009
@@ -5,7 +5,7 @@
 use Carp;
 use vars qw($VERSION @ISA @EXPORT @EXPORT_OK $AUTOLOAD);
 
-$VERSION = '4.07';
+$VERSION = '4.08';
 
 require WWW::Curl;
 require Exporter;




More information about the Pkg-perl-cvs-commits mailing list