r23185 - in /branches/upstream/libwww-curl-perl/current: ./ lib/WWW/ lib/WWW/Curl/ t/ template/

gregoa at users.alioth.debian.org gregoa at users.alioth.debian.org
Mon Jul 14 16:16:35 UTC 2008


Author: gregoa
Date: Mon Jul 14 16:16:35 2008
New Revision: 23185

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

Added:
    branches/upstream/libwww-curl-perl/current/LICENSE
    branches/upstream/libwww-curl-perl/current/README.Win32
Modified:
    branches/upstream/libwww-curl-perl/current/Changes
    branches/upstream/libwww-curl-perl/current/Curl.xs
    branches/upstream/libwww-curl-perl/current/MANIFEST
    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/lib/WWW/Curl.pm
    branches/upstream/libwww-curl-perl/current/lib/WWW/Curl/Easy.pm
    branches/upstream/libwww-curl-perl/current/lib/WWW/Curl/Share.pm
    branches/upstream/libwww-curl-perl/current/t/14duphandle.t
    branches/upstream/libwww-curl-perl/current/t/15duphandle-callback.t
    branches/upstream/libwww-curl-perl/current/template/Easy.pm.tmpl
    branches/upstream/libwww-curl-perl/current/template/Share.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=23185&op=diff
==============================================================================
--- branches/upstream/libwww-curl-perl/current/Changes (original)
+++ branches/upstream/libwww-curl-perl/current/Changes Mon Jul 14 16:16:35 2008
@@ -1,4 +1,11 @@
 Revision history for Perl extension WWW::Curl.
+4.05 Sat Jul 06 2008: - Balint Szilakszi <szbalint at cpan.org>
+
+    - Corrected the duphandle mechanism.
+    - Fixed a typo (fixes RT #37253).
+    - Added better Windows compatibility detection and separate
+      installation instructions (thanks to Shiyu Tang).
+
 4.04 Sat Jun 21 2008: - Balint Szilakszi <szbalint at cpan.org>
 
     - Test::More and use_ok at begin time doesn't mesh with no plan.
@@ -10,6 +17,7 @@
       Use a filehandle or reference instead.
     - Fixed tests for 5.6, raised minimum Perl version to 5.6.1 due to tests.
     - Fixed a duphandle bug.
+
 4.02 Thu Jun 19 2008: - Balint Szilakszi <szbalint at cpan.org>
 
     - Adding forgotten backwards compatibility with older Perl versions

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=23185&op=diff
==============================================================================
--- branches/upstream/libwww-curl-perl/current/Curl.xs (original)
+++ branches/upstream/libwww-curl-perl/current/Curl.xs Mon Jul 14 16:16:35 2008
@@ -636,17 +636,17 @@
 
         curl_easy_setopt(clone->curl, CURLOPT_WRITEFUNCTION, write_callback_func);
         curl_easy_setopt(clone->curl, CURLOPT_READFUNCTION, read_callback_func);
-	if (self->callback[CURLOPT_HEADERFUNCTION] || self->callback_ctx[CURLOPT_HEADERFUNCTION]) {
+	if (self->callback[callback_index(CURLOPT_HEADERFUNCTION)] || self->callback_ctx[callback_index(CURLOPT_WRITEHEADER)]) {
 		curl_easy_setopt(clone->curl, CURLOPT_HEADERFUNCTION, header_callback_func);
 		curl_easy_setopt(clone->curl, CURLOPT_WRITEHEADER, clone); 
 	}
 
-	if (self->callback[CURLOPT_PROGRESSFUNCTION] || self->callback_ctx[CURLOPT_PROGRESSFUNCTION]) {
+	if (self->callback[callback_index(CURLOPT_PROGRESSFUNCTION)] || self->callback_ctx[callback_index(CURLOPT_PROGRESSDATA)]) {
 		curl_easy_setopt(clone->curl, CURLOPT_PROGRESSFUNCTION, progress_callback_func);
 		curl_easy_setopt(clone->curl, CURLOPT_PROGRESSDATA, clone); 
 	}
 	
-	if (self->callback[CURLOPT_DEBUGFUNCTION] || self->callback_ctx[CURLOPT_DEBUGFUNCTION]) {
+	if (self->callback[callback_index(CURLOPT_DEBUGFUNCTION)] || self->callback_ctx[callback_index(CURLOPT_DEBUGDATA)]) {
 		curl_easy_setopt(clone->curl, CURLOPT_DEBUGFUNCTION, debug_callback_func);
 		curl_easy_setopt(clone->curl, CURLOPT_DEBUGDATA, clone);
 	}
@@ -685,48 +685,41 @@
                         &(self->callback_ctx[callback_index(option)]), value);
                 break;
             case CURLOPT_WRITEHEADER:
-        curl_easy_setopt(self->curl, CURLOPT_HEADERFUNCTION, SvOK(value) ? header_callback_func : NULL);
+		curl_easy_setopt(self->curl, CURLOPT_HEADERFUNCTION, SvOK(value) ? header_callback_func : NULL);
         	curl_easy_setopt(self->curl, option, SvOK(value) ? self : NULL);
-                perl_curl_easy_register_callback(self,
-                        &(self->callback_ctx[callback_index(option)]),value);
+                perl_curl_easy_register_callback(self,&(self->callback_ctx[callback_index(option)]),value);
                 break;
             case CURLOPT_PROGRESSDATA:
-        curl_easy_setopt(self->curl, CURLOPT_PROGRESSFUNCTION, SvOK(value) ? progress_callback_func : NULL);
+		curl_easy_setopt(self->curl, CURLOPT_PROGRESSFUNCTION, SvOK(value) ? progress_callback_func : NULL);
         	curl_easy_setopt(self->curl, option, SvOK(value) ? self : NULL); 
-                perl_curl_easy_register_callback(self,
-                        &(self->callback_ctx[callback_index(option)]), value);
+                perl_curl_easy_register_callback(self,&(self->callback_ctx[callback_index(option)]), value);
                 break;
             case CURLOPT_DEBUGDATA:
-	curl_easy_setopt(self->curl, CURLOPT_DEBUGFUNCTION, SvOK(value) ? debug_callback_func : NULL);
+		curl_easy_setopt(self->curl, CURLOPT_DEBUGFUNCTION, SvOK(value) ? debug_callback_func : NULL);
         	curl_easy_setopt(self->curl, option, SvOK(value) ? self : NULL); 
-                perl_curl_easy_register_callback(self,
-                        &(self->callback_ctx[callback_index(option)]), value);
+                perl_curl_easy_register_callback(self,&(self->callback_ctx[callback_index(option)]), value);
                 break;
 
             /* SV * to a subroutine ref */
             case CURLOPT_WRITEFUNCTION:
             case CURLOPT_READFUNCTION:
-               perl_curl_easy_register_callback(self,
-                       &(self->callback[callback_index(option)]), value);
-               break;
+		perl_curl_easy_register_callback(self,&(self->callback[callback_index(option)]), value);
+		break;
             case CURLOPT_HEADERFUNCTION:
-               curl_easy_setopt(self->curl, option, SvOK(value) ? header_callback_func : NULL);
+		curl_easy_setopt(self->curl, option, SvOK(value) ? header_callback_func : NULL);
 		curl_easy_setopt(self->curl, CURLOPT_WRITEHEADER, SvOK(value) ? self : NULL);
-               perl_curl_easy_register_callback(self,
-                       &(self->callback[callback_index(option)]), value);
-               break;
+		perl_curl_easy_register_callback(self,&(self->callback[callback_index(option)]), value);
+		break;
             case CURLOPT_PROGRESSFUNCTION:
         	curl_easy_setopt(self->curl, option, SvOK(value) ? progress_callback_func : NULL);
 		curl_easy_setopt(self->curl, CURLOPT_PROGRESSDATA, SvOK(value) ? self : NULL);
-               perl_curl_easy_register_callback(self,
-                       &(self->callback[callback_index(option)]), value);
-               break;
+		perl_curl_easy_register_callback(self,&(self->callback[callback_index(option)]), value);
+		break;
             case CURLOPT_DEBUGFUNCTION:
 		curl_easy_setopt(self->curl, option, SvOK(value) ? debug_callback_func : NULL);
 		curl_easy_setopt(self->curl, CURLOPT_DEBUGDATA, SvOK(value) ? self : NULL);
-               perl_curl_easy_register_callback(self,
-                       &(self->callback[callback_index(option)]), value);
-               break;
+		perl_curl_easy_register_callback(self,&(self->callback[callback_index(option)]), value);
+		break;
 
             /* slist cases */
             case CURLOPT_HTTPHEADER:

Added: branches/upstream/libwww-curl-perl/current/LICENSE
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-curl-perl/current/LICENSE?rev=23185&op=file
==============================================================================
--- branches/upstream/libwww-curl-perl/current/LICENSE (added)
+++ branches/upstream/libwww-curl-perl/current/LICENSE Mon Jul 14 16:16:35 2008
@@ -1,0 +1,4 @@
+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 licenses. You may
+pick one of these licenses.

Modified: branches/upstream/libwww-curl-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-curl-perl/current/MANIFEST?rev=23185&op=diff
==============================================================================
--- branches/upstream/libwww-curl-perl/current/MANIFEST (original)
+++ branches/upstream/libwww-curl-perl/current/MANIFEST Mon Jul 14 16:16:35 2008
@@ -12,10 +12,12 @@
 lib/WWW/Curl/Form.pm
 lib/WWW/Curl/Multi.pm
 lib/WWW/Curl/Share.pm
+LICENSE
 Makefile.PL
 MANIFEST
 META.yml
 README
+README.Win32
 SIGNATURE
 t/00constants.t
 t/01basic.t

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=23185&op=diff
==============================================================================
--- branches/upstream/libwww-curl-perl/current/META.yml (original)
+++ branches/upstream/libwww-curl-perl/current/META.yml Mon Jul 14 16:16:35 2008
@@ -19,4 +19,4 @@
     - t
 requires:
   perl: 5.6.1
-version: 4.04
+version: 4.05

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=23185&op=diff
==============================================================================
--- branches/upstream/libwww-curl-perl/current/Makefile.PL (original)
+++ branches/upstream/libwww-curl-perl/current/Makefile.PL Mon Jul 14 16:16:35 2008
@@ -11,45 +11,45 @@
 no_index		directory => 'template';
 # This is a hack. If you have libcurl installed, just specify curl.h below
 # and comment out this line.
-requires_external_bin	'curl-config';
+if ($^O ne 'MSWin32') {
+	requires_external_bin	'curl-config';
+} else {
+	print	"Sorry, no automated install is available on Windows,\n".
+		"please see the README.Win32 file on instructions for a manual install.\n";
+	exit(0);
+}
+
+my @includes = qw();
+my ($cflags,$lflags, $ldflags) = ('','','');
 
 # This utility helper generates the constants function from curl.h
 # It is normally only used by the maintainer, but if you're curl is older
 # or missing some constants, you can delete curlopt-constants.c and re-run 'perl Makefile.PL'
 # You may need to specify where to find curl.h on your platform
 # These are guesses only, in case curl-config is not telling us.
+
+if ($^O ne 'MSWin32') {
+	push @includes, qw(
+		/usr/include
+		/usr/local/curl/include
+		/usr/local/include/curl
+		../../include
+		../curl/include
+	);
+}
 #
-
-my @includes = qw(
-    /usr/include
-    /usr/local/curl/include
-    /usr/local/include/curl
-    ../../include
-    ../curl/include
-    C:\\INCLUDE\\CURL
-);
-
+# Get curl to tell us where it is, if we can.
 #
-# Get curl to tell us where it is, if we can. May well not find anything on Windows
-#
-my $cflags = `curl-config --cflags`;
-my $lflags = `curl-config --libs`;
-my $libcurl_version = `curl-config --version`;
-print "version is $libcurl_version";
+
+
+if ($^O ne 'MSWin32') {
+	$cflags = `curl-config --cflags`;
+	$lflags = `curl-config --libs`;
+}
 
 # can't find link flags, make some guesses
 if (!defined($lflags)) {
     $lflags="-lcurl";
-    # Windows version of libcurl - not widely tested, feedback welcome!
-    if ($^O eq 'MSWin32') {
-	foreach my $try (@includes) {
-	    if (-f $try . '\lib\libcurl_imp.lib') {
-		$lflags = $try . '\lib\libcurl_imp.lib' unless(-f $lflags);
-		last;
-		}
-	}
-        $lflags="libcurl.lib" unless ($lflags);
-    }
     print "Guessing your linker flags as: $lflags\n";
 }
 
@@ -295,7 +295,7 @@
 WriteMakefile(
     'NAME'         => 'WWW::Curl',
     'VERSION_FROM' => 'lib/WWW/Curl.pm',      # finds $VERSION
-    'LIBS'         => $lflags,        # e.g., '-lm'
+    'LIBS'         => "$ldflags $lflags",        # e.g., '-lm'
     'INC'          => $curl_d,        # e.g., '-I/usr/include/other'
     'clean' => { FILES => "curlopt-constants.c head.out body.out" }
 );

Modified: branches/upstream/libwww-curl-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-curl-perl/current/README?rev=23185&op=diff
==============================================================================
--- branches/upstream/libwww-curl-perl/current/README (original)
+++ branches/upstream/libwww-curl-perl/current/README Mon Jul 14 16:16:35 2008
@@ -4,7 +4,8 @@
 See http://curl.haxx.se/ for more information on cURL and libcurl.
 
 This module requires libcurl and the corresponding headerfiles to be
-installed. You then may install this module via the usual way:
+installed. You then may install this module via the usual way
+(for installation on Windows please see README.Win32):
 
     perl Makefile.PL
     make

Added: branches/upstream/libwww-curl-perl/current/README.Win32
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-curl-perl/current/README.Win32?rev=23185&op=file
==============================================================================
--- branches/upstream/libwww-curl-perl/current/README.Win32 (added)
+++ branches/upstream/libwww-curl-perl/current/README.Win32 Mon Jul 14 16:16:35 2008
@@ -1,0 +1,12 @@
+Installation on Windows need to be done manually, by editing Makefile.PL.
+
+1. Specify your curl include directory on the line "my @include = qw()".
+2. Specify the following parameters on the line below, where <DIR> is your curl directory like this:
+
+my ($cflags,$ldflags,$lflags) = ('-I"<DIR>\\include"', '-L"<DIR>\\lib"','-lcurl -lcurldll');
+
+<DIR> can be for example: "E:\\Perldev\\downloader\\curl-7.18.2-devel-mingw32" (without quotes);
+3. Save Makefile.PL.
+4. Execute "perl Makefile.PL";
+5. Execute "nmake" ( you may need nmake from Mircosoft, which can be downloaded from http://support.microsoft.com/default.aspx?scid=kb;en-us;Q132084 );
+6. Execute "nmake install".

Modified: branches/upstream/libwww-curl-perl/current/SIGNATURE
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-curl-perl/current/SIGNATURE?rev=23185&op=diff
==============================================================================
--- branches/upstream/libwww-curl-perl/current/SIGNATURE (original)
+++ branches/upstream/libwww-curl-perl/current/SIGNATURE Mon Jul 14 16:16:35 2008
@@ -14,12 +14,14 @@
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
-SHA1 03c6dc0788af81edd944e4b1dd48a7970df36fdd Changes
-SHA1 9eb27a160d9259ca0827282c85effb4e50e33577 Curl.xs
-SHA1 63693eb209d0c6f82eb1f64b88c03e599351ad67 MANIFEST
-SHA1 2f3aa9b3d0cf789412b9939f8173648109d0d2e3 META.yml
-SHA1 95ceb9b98627c50252d4b56356be28c416af96fa Makefile.PL
-SHA1 ee5ac8926c73fa624e8ef8908a52a8b3bc5bee3b README
+SHA1 5e0b0a409e7a96524bfa071ca7f6e69b479191bd Changes
+SHA1 94dc4a32bc5f04deb4784b7b43f0bdf75ace8ed8 Curl.xs
+SHA1 94cbea5b3fb940e25cd4535d1c81bfd7d51dac3c LICENSE
+SHA1 7b182375c7584c6edb02989e822acaf8eac0a2e6 MANIFEST
+SHA1 667f7ccff205b983166e237ec8c30aacd3730684 META.yml
+SHA1 09323cfc717a3723d07bdcef329725bdd5f53624 Makefile.PL
+SHA1 322619607d1c95a9e29a13f74f0b1f1c92d0eed5 README
+SHA1 ed6f9f399075307a33bd02902ebbadbbbfbd8bab README.Win32
 SHA1 f0577f8f88a6703e9bca2d10196cfd293f3d6f2f inc/Module/Install.pm
 SHA1 5d574849849860b8cf06035cc6f1a306c66cb326 inc/Module/Install/Base.pm
 SHA1 c30f50bc2a1542dff17f84a54d9316f3c3c6299e inc/Module/Install/Can.pm
@@ -27,11 +29,11 @@
 SHA1 c8b486eb7a38823afb92e4d5b00dbb57b43351d5 inc/Module/Install/MakeMaker.pm
 SHA1 cd14c8de2a67b0f14df9bc20c27f3edabd359d1b inc/Module/Install/Makefile.pm
 SHA1 a2162aec678d21988fce47ab805cf01773196292 inc/Module/Install/Metadata.pm
-SHA1 e75740b274c876a04f2dadf945803a46c86cbb57 lib/WWW/Curl.pm
-SHA1 6c4e8fe8aec60bf3b835c6f539896d47580dd1dd lib/WWW/Curl/Easy.pm
+SHA1 5cd962de0a085f0ec7625c288df655d6d89dd2e7 lib/WWW/Curl.pm
+SHA1 e536065e27b7621f04619a71c8fff63b28d0d3e2 lib/WWW/Curl/Easy.pm
 SHA1 5909923d44832d435213746d562bf6b6075f5ef3 lib/WWW/Curl/Form.pm
 SHA1 46e9ebfbe386bbf319f26e6d3eec7e17772026b5 lib/WWW/Curl/Multi.pm
-SHA1 51efe8d02da567645a0903df6972f2a92a8f4976 lib/WWW/Curl/Share.pm
+SHA1 ab003199fd68eef6d58d382aded93c01a6efd9ae lib/WWW/Curl/Share.pm
 SHA1 259c953ed6189b23fddd5d4afd2c6df0fbb24930 t/00constants.t
 SHA1 553836d2318a3a2ff6982616b3237eb86c372194 t/01basic.t
 SHA1 07b63b1baca142a0e34e79633d0eb57684524bed t/02callbacks.t
@@ -43,8 +45,8 @@
 SHA1 ec62c062c627e7f52df512eae496223bd49ad2f3 t/09times.t
 SHA1 9499f362a6d06a19aa6bc41d3647dbd5dc5aca63 t/10errbuf.t
 SHA1 0390b52a5cbebb2896f38aecc8602acb20199790 t/13slowleak.t
-SHA1 51da20f1c1dfff1a51a3adcc28016365584a3516 t/14duphandle.t
-SHA1 2aa236a0bea6c7604714669ab50c4400aec76bd0 t/15duphandle-callback.t
+SHA1 f911c90eaf0fdd2ee60f913262ee6ca3236037f0 t/14duphandle.t
+SHA1 62551de2e5da5df233b296b716093cea8d791d70 t/15duphandle-callback.t
 SHA1 785507b3fa6f414298cdcf7ceaba1f9274aa07d2 t/16formpost.t
 SHA1 e784a874eb36fd5b16a12fc58365cce697ecbbab t/17slist.t
 SHA1 4246e503682d25acf461e539104d10b66e74889c t/18twinhandles.t
@@ -63,13 +65,13 @@
 SHA1 20ec0bd03ff2600505d38623153a6eb3087b5814 t/new/README
 SHA1 ac25bfa56d36f19cbee72a968b06372e88602a61 t/pod-coverage.t
 SHA1 0190346d7072d458c8a10a45c19f86db641dcc48 t/pod.t
-SHA1 22927fcc4dc67aee72d96b22b66dc92a952bfd1d template/Easy.pm.tmpl
-SHA1 0b5ef1bf34b3402bec9009aea298367e62d4675a template/Share.pm.tmpl
+SHA1 a049ec8232b28a1aedb130a67d992a63b8361a8d template/Easy.pm.tmpl
+SHA1 b4841adcad866b70d9d72f171d3d0f8f9d5b3c79 template/Share.pm.tmpl
 SHA1 468b011caaf4d54609b421027d7c6262a9260e89 typemap
 -----BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.6 (GNU/Linux)
+Version: GnuPG v1.4.9 (GNU/Linux)
 
-iD8DBQFIXKCv+22TSbOiiI8RAliHAJ4pMGooq+PK9KjG+EpCza4ZcfV59QCdEBze
-T6VD64nEBGHkvS51HKnvwis=
-=jq26
+iEYEARECAAYFAkhv9rgACgkQ+22TSbOiiI+IdwCfeIufWW3r0CeAaS4UX2DQO7J8
+AHQAoJLDA/poQi2NCqHF1Mnpprc/qafN
+=w48a
 -----END PGP SIGNATURE-----

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=23185&op=diff
==============================================================================
--- branches/upstream/libwww-curl-perl/current/lib/WWW/Curl.pm (original)
+++ branches/upstream/libwww-curl-perl/current/lib/WWW/Curl.pm Mon Jul 14 16:16:35 2008
@@ -1,11 +1,12 @@
 package WWW::Curl;
 
 use strict;
+use warnings;
 use vars qw(@ISA $VERSION);
 use DynaLoader;
 
 BEGIN {
-    $VERSION = '4.04';
+    $VERSION = '4.05';
     @ISA     = qw(DynaLoader);
     __PACKAGE__->bootstrap;
 }
@@ -79,7 +80,7 @@
 	use WWW::Curl::Multi;
 
 	my %easy;
-	my $curl = WWW::Curl::Easy->new:
+	my $curl = WWW::Curl::Easy->new;
 	my $curl_id = '13'; # This should be a handle unique id.
 	$easy{$curl_id} = $curl;
 	my $active_handles = 0;
@@ -322,7 +323,7 @@
 
 Copyright (C) 2000-2005,2008 Daniel Stenberg, Cris Bailiff,
 Sebastian Riedel, Balint 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 licenses. You may

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=23185&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 Mon Jul 14 16:16:35 2008
@@ -1,10 +1,11 @@
 package WWW::Curl::Easy;
 
 use strict;
+use warnings;
 use Carp;
 use vars qw($VERSION @ISA @EXPORT @EXPORT_OK $AUTOLOAD);
 
-$VERSION = '4.04';
+$VERSION = '4.05';
 
 require WWW::Curl;
 require Exporter;

Modified: branches/upstream/libwww-curl-perl/current/lib/WWW/Curl/Share.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-curl-perl/current/lib/WWW/Curl/Share.pm?rev=23185&op=diff
==============================================================================
--- branches/upstream/libwww-curl-perl/current/lib/WWW/Curl/Share.pm (original)
+++ branches/upstream/libwww-curl-perl/current/lib/WWW/Curl/Share.pm Mon Jul 14 16:16:35 2008
@@ -1,6 +1,7 @@
 package WWW::Curl::Share;
 
 use strict;
+use warnings;
 use Carp;
 use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD);
 

Modified: branches/upstream/libwww-curl-perl/current/t/14duphandle.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-curl-perl/current/t/14duphandle.t?rev=23185&op=diff
==============================================================================
--- branches/upstream/libwww-curl-perl/current/t/14duphandle.t (original)
+++ branches/upstream/libwww-curl-perl/current/t/14duphandle.t Mon Jul 14 16:16:35 2008
@@ -14,44 +14,44 @@
 
 {
 my $other_handle;
+my $head = tempfile();
+my $body = tempfile();
 
-{
-# Init the curl session
-my $curl = WWW::Curl::Easy->new();
-ok($curl, 'Curl session initialize returns something');
-ok(ref($curl) eq 'WWW::Curl::Easy', 'Curl session looks like an object from the WWW::Curl::Easy module');
+	{
+		# Init the curl session
+		my $curl = WWW::Curl::Easy->new();
+		ok($curl, 'Curl session initialize returns something');
+		ok(ref($curl) eq 'WWW::Curl::Easy', 'Curl session looks like an object from the WWW::Curl::Easy module');
 
-ok(! $curl->setopt(CURLOPT_NOPROGRESS, 1), "Setting CURLOPT_NOPROGRESS");
-ok(! $curl->setopt(CURLOPT_FOLLOWLOCATION, 1), "Setting CURLOPT_FOLLOWLOCATION");
-ok(! $curl->setopt(CURLOPT_TIMEOUT, 30), "Setting CURLOPT_TIMEOUT");
+		ok(! $curl->setopt(CURLOPT_NOPROGRESS, 1), "Setting CURLOPT_NOPROGRESS");
+		ok(! $curl->setopt(CURLOPT_FOLLOWLOCATION, 1), "Setting CURLOPT_FOLLOWLOCATION");
+		ok(! $curl->setopt(CURLOPT_TIMEOUT, 30), "Setting CURLOPT_TIMEOUT");
 
-my $head = tempfile();
-ok(! $curl->setopt(CURLOPT_WRITEHEADER, $head), "Setting CURLOPT_WRITEHEADER");
+		ok(! $curl->setopt(CURLOPT_WRITEHEADER, $head), "Setting CURLOPT_WRITEHEADER");
 
-my $body = tempfile();
-ok(! $curl->setopt(CURLOPT_FILE, $body), "Setting CURLOPT_FILE");
+		ok(! $curl->setopt(CURLOPT_FILE, $body), "Setting CURLOPT_FILE");
 
-ok(! $curl->setopt(CURLOPT_URL, $url), "Setting CURLOPT_URL");
+		ok(! $curl->setopt(CURLOPT_URL, $url), "Setting CURLOPT_URL");
 
-my @myheaders;
-$myheaders[0] = "Server: www";
-$myheaders[1] = "User-Agent: Perl interface for libcURL";
-ok(! $curl->setopt(CURLOPT_HTTPHEADER, \@myheaders), "Setting CURLOPT_HTTPHEADER");
+		my @myheaders;
+		$myheaders[0] = "Server: www";
+		$myheaders[1] = "User-Agent: Perl interface for libcURL";
+		ok(! $curl->setopt(CURLOPT_HTTPHEADER, \@myheaders), "Setting CURLOPT_HTTPHEADER");
 
-# duplicate the handle
-$other_handle = $curl->duphandle();
-ok ($other_handle && ref($other_handle) eq 'WWW::Curl::Easy', "Duplicated handle seems to be an object in the right namespace");
+		# duplicate the handle
+		$other_handle = $curl->duphandle();
+		ok ($other_handle && ref($other_handle) eq 'WWW::Curl::Easy', "Duplicated handle seems to be an object in the right namespace");
 
-foreach my $x ($other_handle,$curl) {
-    my $retcode = $x->perform();
-    ok(!$retcode, "Perform returns without an error");
-    if ($retcode == 0) {
-	my $bytes=$x->getinfo(CURLINFO_SIZE_DOWNLOAD);
-	my $realurl=$x->getinfo(CURLINFO_EFFECTIVE_URL);
-	my $httpcode=$x->getinfo(CURLINFO_HTTP_CODE);
-    }
-}
-}
+		foreach my $x ($other_handle,$curl) {
+			my $retcode = $x->perform();
+			ok(!$retcode, "Perform returns without an error");
+			if ($retcode == 0) {
+				my $bytes	= $x->getinfo(CURLINFO_SIZE_DOWNLOAD);
+				my $realurl	= $x->getinfo(CURLINFO_EFFECTIVE_URL);
+				my $httpcode	= $x->getinfo(CURLINFO_HTTP_CODE);
+			}
+		}
+	}
 
 ok(1, "Survived original curl handle DESTROY");
 

Modified: branches/upstream/libwww-curl-perl/current/t/15duphandle-callback.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-curl-perl/current/t/15duphandle-callback.t?rev=23185&op=diff
==============================================================================
--- branches/upstream/libwww-curl-perl/current/t/15duphandle-callback.t (original)
+++ branches/upstream/libwww-curl-perl/current/t/15duphandle-callback.t Mon Jul 14 16:16:35 2008
@@ -2,101 +2,93 @@
 
 use strict;
 use warnings;
-use diagnostics;
 use lib 'inc';
 use lib 'blib/lib';
 use lib 'blib/arch';
-use Test::More;
+use Test::More tests => 25;
 use File::Temp qw/tempfile/;
 use WWW::Curl::Easy;
-
-if ($] < 5.008) {
-	plan skip_all => "duphandle doesn't work on 5.6, too old";
-} else {
-	plan tests => 25;
-}
-
 
 my $url = $ENV{CURL_TEST_URL} || "http://www.google.com";
 my $other_handle;
 my $head = tempfile();
 my $hcall;
+my $body_called = 0;
+my $head_called = 0;
 {
-# Init the curl session
-my $curl = WWW::Curl::Easy->new();
-ok($curl, 'Curl session initialize returns something');
-ok(ref($curl) eq 'WWW::Curl::Easy', 'Curl session looks like an object from the WWW::Curl::Easy module');
+	# Init the curl session
+	my $curl = WWW::Curl::Easy->new();
+	ok($curl, 'Curl session initialize returns something'); #1
+	ok(ref($curl) eq 'WWW::Curl::Easy', 'Curl session looks like an object from the WWW::Curl::Easy module'); #2
 
-ok(! $curl->setopt(CURLOPT_NOPROGRESS, 1), "Setting CURLOPT_NOPROGRESS");
-ok(! $curl->setopt(CURLOPT_FOLLOWLOCATION, 1), "Setting CURLOPT_FOLLOWLOCATION");
-ok(! $curl->setopt(CURLOPT_TIMEOUT, 30), "Setting CURLOPT_TIMEOUT");
+	ok(! $curl->setopt(CURLOPT_NOPROGRESS, 1), "Setting CURLOPT_NOPROGRESS"); #3
+	ok(! $curl->setopt(CURLOPT_FOLLOWLOCATION, 1), "Setting CURLOPT_FOLLOWLOCATION"); #4
+	ok(! $curl->setopt(CURLOPT_TIMEOUT, 30), "Setting CURLOPT_TIMEOUT"); #5
 
-ok(! $curl->setopt(CURLOPT_WRITEHEADER, $head), "Setting CURLOPT_WRITEHEADER");
+	ok(! $curl->setopt(CURLOPT_WRITEHEADER, $head), "Setting CURLOPT_WRITEHEADER"); #6
 
-my $body = tempfile();
-ok(! $curl->setopt(CURLOPT_FILE, $body), "Setting CURLOPT_FILE");
+	my $body = tempfile();
+	ok(! $curl->setopt(CURLOPT_FILE, $body), "Setting CURLOPT_FILE"); #7
 
 
-my @myheaders;
-$myheaders[0] = "Server: www";
-$myheaders[1] = "User-Agent: Perl interface for libcURL";
-ok(! $curl->setopt(CURLOPT_HTTPHEADER, \@myheaders), "Setting CURLOPT_HTTPHEADER");
+	my @myheaders;
+	$myheaders[0] = "Server: www";
+	$myheaders[1] = "User-Agent: Perl interface for libcURL";
+	ok(! $curl->setopt(CURLOPT_HTTPHEADER, \@myheaders), "Setting CURLOPT_HTTPHEADER"); #8
 
 
-my $body_called = 0;
-sub body_callback {
-    my ($chunk,$handle)=@_;
-    $body_called++;
-    return length($chunk); # OK
+	sub body_callback {
+    		my ($chunk,$handle)=@_;
+    		$body_called++;
+    		return length($chunk); # OK
+	}
+
+	sub head_callback {
+		my ($chunk,$handle)=@_;
+		$head_called++;
+		return length($chunk); # OK
+	}
+
+	$hcall = \&head_callback;
+	ok(! $curl->setopt(CURLOPT_WRITEFUNCTION, \&body_callback), "Setting CURLOPT_WRITEFUNCTION callback"); #9
+	ok(! $curl->setopt(CURLOPT_HEADERFUNCTION, $hcall), "Setting CURLOPT_HEADERFUNCTION callback"); #10
+
+	ok(! $curl->setopt(CURLOPT_URL, $url), "Setting CURLOPT_URL"); #11
+
+	# duplicate the handle
+	$other_handle = $curl->duphandle();
+	ok($other_handle, 'duphandle seems to return something'); #12
+	ok(ref($other_handle) eq 'WWW::Curl::Easy', 'Dup handle looks like an object from the WWW::Curl::Easy module'); #13
+
+	foreach my $x ($curl,$other_handle) {
+		my $retcode=$x->perform();
+		ok(!$retcode, "Handle return code check"); #14-15
+		if ($retcode == 0) {
+			my $bytes	= $x->getinfo(CURLINFO_SIZE_DOWNLOAD);
+			my $realurl	= $x->getinfo(CURLINFO_EFFECTIVE_URL);
+			my $httpcode	= $x->getinfo(CURLINFO_HTTP_CODE);
+		}
+	}
+	ok( $head_called >= 2, "Header callback seems to have worked"); #16
+	ok( $body_called >= 2, "Body callback seems to have worked"); #17
 }
 
-my $head_called = 0;
-sub head_callback {
-    my ($chunk,$handle)=@_;
-    $head_called++;
-    return length($chunk); # OK
-}
+ok(! $other_handle->setopt(CURLOPT_URL, $url), "Setting CURLOPT_URL"); #18
 
-$hcall = \&head_callback;
-ok(! $curl->setopt(CURLOPT_WRITEFUNCTION, \&body_callback), "Setting CURLOPT_WRITEFUNCTION callback");
-ok(! $curl->setopt(CURLOPT_HEADERFUNCTION, $hcall), "Setting CURLOPT_HEADERFUNCTION callback");
-
-ok(! $curl->setopt(CURLOPT_URL, $url), "Setting CURLOPT_URL");
-
-# duplicate the handle
-$other_handle = $curl->duphandle();
-ok($other_handle, 'duphandle seems to return something');
-ok(ref($other_handle) eq 'WWW::Curl::Easy', 'Dup handle looks like an object from the WWW::Curl::Easy module');
-
-foreach my $x ($curl,$other_handle) {
-    my $retcode=$x->perform();
-    ok(!$retcode, "Handle return code check");
-    if ($retcode == 0) {
-	my $bytes=$x->getinfo(CURLINFO_SIZE_DOWNLOAD);
-	my $realurl=$x->getinfo(CURLINFO_EFFECTIVE_URL);
-	my $httpcode=$x->getinfo(CURLINFO_HTTP_CODE);
-    }
-}
-ok( $head_called >= 2, "Header callback seems to have worked");
-ok( $body_called >= 2, "Body callback seems to have worked");
-
-}
-
-ok(! $other_handle->setopt(CURLOPT_URL, $url), "Setting CURLOPT_URL");
 my $retcode=$other_handle->perform();
 ok(!$retcode, "Handle return code check");
 ok( 1, "We survive DESTROY time for the original handle");
 ok( head_callback('1',undef), "We can still access the callbacks");
 my $third = $other_handle->duphandle();
-ok($third, 'duphandle seems to return something');
+ok($third, 'duphandle seems to return something again');
 ok(ref($third) eq 'WWW::Curl::Easy', 'Dup handle looks like an object from the WWW::Curl::Easy module');
 
 foreach my $x ($other_handle,$third) {
-    my $retcode=$x->perform();
-    ok(!$retcode, "Handle return code check");
-    if ($retcode == 0) {
-	my $bytes=$x->getinfo(CURLINFO_SIZE_DOWNLOAD);
-	my $realurl=$x->getinfo(CURLINFO_EFFECTIVE_URL);
-	my $httpcode=$x->getinfo(CURLINFO_HTTP_CODE);
-    }
+	my $retcode=$x->perform();
+	ok(!$retcode, "Handle return code check");
+	if ($retcode == 0) {
+		my $bytes	= $x->getinfo(CURLINFO_SIZE_DOWNLOAD);
+		my $realurl	= $x->getinfo(CURLINFO_EFFECTIVE_URL);
+		my $httpcode	= $x->getinfo(CURLINFO_HTTP_CODE);
+	}
 }

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=23185&op=diff
==============================================================================
--- branches/upstream/libwww-curl-perl/current/template/Easy.pm.tmpl (original)
+++ branches/upstream/libwww-curl-perl/current/template/Easy.pm.tmpl Mon Jul 14 16:16:35 2008
@@ -1,10 +1,11 @@
 package WWW::Curl::Easy;
 
 use strict;
+use warnings;
 use Carp;
 use vars qw($VERSION @ISA @EXPORT @EXPORT_OK $AUTOLOAD);
 
-$VERSION = '4.04';
+$VERSION = '4.05';
 
 require WWW::Curl;
 require Exporter;

Modified: branches/upstream/libwww-curl-perl/current/template/Share.pm.tmpl
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-curl-perl/current/template/Share.pm.tmpl?rev=23185&op=diff
==============================================================================
--- branches/upstream/libwww-curl-perl/current/template/Share.pm.tmpl (original)
+++ branches/upstream/libwww-curl-perl/current/template/Share.pm.tmpl Mon Jul 14 16:16:35 2008
@@ -1,6 +1,7 @@
 package WWW::Curl::Share;
 
 use strict;
+use warnings;
 use Carp;
 use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD);
 




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