r60053 - in /branches/upstream/libwww-curl-perl/current: Changes Curl.xs META.yml Makefile.PL SIGNATURE lib/WWW/Curl.pm lib/WWW/Curl/Easy.pm lib/WWW/Curl/Form.pm t/01basic.t template/Easy.pm.tmpl
ansgar-guest at users.alioth.debian.org
ansgar-guest at users.alioth.debian.org
Mon Jul 5 01:31:10 UTC 2010
Author: ansgar-guest
Date: Mon Jul 5 01:30:44 2010
New Revision: 60053
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=60053
Log:
[svn-upgrade] new version libwww-curl-perl (4.12)
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/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/Form.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=60053&op=diff
==============================================================================
--- branches/upstream/libwww-curl-perl/current/Changes (original)
+++ branches/upstream/libwww-curl-perl/current/Changes Mon Jul 5 01:30:44 2010
@@ -1,4 +1,11 @@
Revision history for the Perl binding of libcurl, WWW::Curl.
+4.12 Sun Jun 04 2010: - Balint Szilakszi <szbalint at cpan.org>
+
+ - Fixed WWW::Curl::Form (patch contributed by Michael Ing).
+ - Added CURLPROXY_* constants (patch by claes).
+ - Added the const_string method to provide access to constants in a non-bareword way.
+ - Fixed t/01basic.t test failure on older libcurl versions.
+
4.11 Fri Dec 18 2009: - Balint Szilakszi <szbalint at cpan.org>
- Fixed t/19multi.t for libcurl versions compiled with asyncronous dns resolution.
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=60053&op=diff
==============================================================================
--- branches/upstream/libwww-curl-perl/current/Curl.xs (original)
+++ branches/upstream/libwww-curl-perl/current/Curl.xs Mon Jul 5 01:30:44 2010
@@ -62,8 +62,8 @@
typedef struct {
- struct HttpPost * post;
- struct HttpPost * last;
+ struct curl_httppost * post;
+ struct curl_httppost * last;
} perl_curl_form;
@@ -218,11 +218,9 @@
static void perl_curl_form_delete(perl_curl_form *self)
{
-#if 0
if (self->post) {
curl_formfree(self->post);
}
-#endif
Safefree(self);
}
@@ -790,17 +788,16 @@
RETVAL = curl_easy_setopt(self->curl, option, IoOFP(sv_2io(value)) );
break;
- /* not working yet...
+ /* not working yet... */
case CURLOPT_HTTPPOST:
if (sv_derived_from(value, "WWW::Curl::Form")) {
- WWW__Curl__form wrapper;
+ WWW__Curl__Form wrapper;
IV tmp = SvIV((SV*)SvRV(value));
- wrapper = INT2PTR(WWW__Curl__form,tmp);
+ wrapper = INT2PTR(WWW__Curl__Form,tmp);
RETVAL = curl_easy_setopt(self->curl, option, wrapper->post);
} else
croak("value is not of type WWW::Curl::Form");
break;
- */
/* Curl share support from Anton Fedorov */
#if (LIBCURL_VERSION_NUM>=0x070a03)
@@ -978,6 +975,11 @@
MODULE = WWW::Curl PACKAGE = WWW::Curl::Form PREFIX = curl_form_
+int
+constant(name,arg)
+ char * name
+ int arg
+
void
curl_form_new(...)
PREINIT:
@@ -998,32 +1000,28 @@
XSRETURN(1);
void
-curl_form_add(self,name,value)
+curl_formadd(self,name,value)
WWW::Curl::Form self
char *name
char *value
CODE:
-#if 0
curl_formadd(&(self->post),&(self->last),
CURLFORM_COPYNAME,name,
CURLFORM_COPYCONTENTS,value,
CURLFORM_END);
-#endif
-
-void
-curl_form_addfile(self,filename,description,type)
+
+void
+curl_formaddfile(self,filename,description,type)
WWW::Curl::Form self
char *filename
char *description
char *type
CODE:
-#if 0
curl_formadd(&(self->post),&(self->last),
CURLFORM_FILE,filename,
CURLFORM_COPYNAME,description,
CURLFORM_CONTENTTYPE,type,
CURLFORM_END);
-#endif
void
curl_form_DESTROY(self)
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=60053&op=diff
==============================================================================
--- branches/upstream/libwww-curl-perl/current/META.yml (original)
+++ branches/upstream/libwww-curl-perl/current/META.yml Mon Jul 5 01:30:44 2010
@@ -22,4 +22,6 @@
- template
requires:
perl: 5.6.1
-version: 4.11
+resources:
+ repository: http://github.com/szbalint/WWW--Curl
+version: 4.12
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=60053&op=diff
==============================================================================
--- branches/upstream/libwww-curl-perl/current/Makefile.PL (original)
+++ branches/upstream/libwww-curl-perl/current/Makefile.PL Mon Jul 5 01:30:44 2010
@@ -9,6 +9,7 @@
license 'MPL or MIT/X-derivate';
perl_version '5.006001';
no_index directory => 'template';
+repository 'http://github.com/szbalint/WWW--Curl';
# This is a hack. If you have libcurl installed, just specify curl.h below
# and comment out this line.
if ($^O ne 'MSWin32') {
@@ -110,6 +111,8 @@
$constants{CURLOPT_}->{$option} = $value;
} elsif ($_ =~ m/^\s*(CURLINFO_|CURLSHOPT_|CURL_LOCK_DATA_|CURLE_|CURL_NETRC_)(\w+)/) {
$constants{$1}->{$2} = $2;
+ } elsif ($_ =~ m/^\s*CURLPROXY_(\w+)\s*=\s*\d+/) {
+ $constants{CURLPROXY_}->{$1} = $1;
}
}
@@ -185,7 +188,7 @@
if ($line !~ m/^\@CURLOPT_INCLUDE\@/) {
print EASY_PM $line;
} else {
- for my $group (qw/CURLOPT_ CURLINFO_ CURLE_ CURL_NETRC_/) {
+ for my $group (qw/CURLOPT_ CURLINFO_ CURLE_ CURL_NETRC_ CURLPROXY_/) {
for my $option (sort keys %{$constants{$group}}) {
next unless $option;
print EASY_PM $group.$option."\n";
Modified: branches/upstream/libwww-curl-perl/current/SIGNATURE
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-curl-perl/current/SIGNATURE?rev=60053&op=diff
==============================================================================
--- branches/upstream/libwww-curl-perl/current/SIGNATURE (original)
+++ branches/upstream/libwww-curl-perl/current/SIGNATURE Mon Jul 5 01:30:44 2010
@@ -14,12 +14,12 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
-SHA1 758725823ca0719908b1138da03481c2ba8419d7 Changes
-SHA1 32ad177360c0e370e4c1bdb83ead474961769e96 Curl.xs
+SHA1 e5832a6de950df4208e57c3b5ce5978e867df5df Changes
+SHA1 cc58e04a4fb86d0ad8ef6abb882b515648ef4c9e Curl.xs
SHA1 94cbea5b3fb940e25cd4535d1c81bfd7d51dac3c LICENSE
SHA1 a33cdbb8996d5b8dfc92da6d34e7327ebde1b1c5 MANIFEST
-SHA1 122bbde2eee75a39914d2b64b8bcc1d9462385b3 META.yml
-SHA1 3025d3ee924e6e7a2f9b5249a646331502c9be72 Makefile.PL
+SHA1 6455def3635ae5d2c55e853a61f7c21acc6637d6 META.yml
+SHA1 bf0ea5c3c087f69376656276fffea8524b02323f Makefile.PL
SHA1 a21d7184f91692fb3d6d7175e4a526f9d99fe3c7 README
SHA1 ed6f9f399075307a33bd02902ebbadbbbfbd8bab README.Win32
SHA1 fd5f3c4f0418efee3b9b16cf8c3902e8374909df inc/Module/Install.pm
@@ -29,13 +29,13 @@
SHA1 dbec1085a29a855202ee797a5bac319cf426827f inc/Module/Install/MakeMaker.pm
SHA1 3e83972921d54198d1246f7278f08664006cd65d inc/Module/Install/Makefile.pm
SHA1 12bf1867955480d47d5171a9e9c6a96fabe0b58f inc/Module/Install/Metadata.pm
-SHA1 7c063f5e01e0489f3725092ea2da3699d9b925d7 lib/WWW/Curl.pm
-SHA1 4e95036c5543aecf91e3d97fa79df03f4a367ffa lib/WWW/Curl/Easy.pm
-SHA1 3fc2f9b503827e28b96c4ea49034039b7f23ab20 lib/WWW/Curl/Form.pm
+SHA1 5d57332dcfd0ee1be67873be520d4371e7bf7262 lib/WWW/Curl.pm
+SHA1 6c3fd8228370ae898e4e0fefcc280aeea9c097fe lib/WWW/Curl/Easy.pm
+SHA1 7ff51363b45f28c4fabc5888c64515eb7f450ae6 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 263f02465cc31d3233585dc7e387137edcf560f0 t/01basic.t
+SHA1 88c7780f18aab350318bd8c6d887558a4ce17519 t/01basic.t
SHA1 07b63b1baca142a0e34e79633d0eb57684524bed t/02callbacks.t
SHA1 905c848deb6492d539c5bdf89c49632a412af15a t/04abort-test.t
SHA1 f9c842503835908a0687ab41655042a16b8b5112 t/05progress.t
@@ -66,13 +66,13 @@
SHA1 20ec0bd03ff2600505d38623153a6eb3087b5814 t/new/README
SHA1 ac25bfa56d36f19cbee72a968b06372e88602a61 t/pod-coverage.t
SHA1 0190346d7072d458c8a10a45c19f86db641dcc48 t/pod.t
-SHA1 1916f03aef4da23a6a998c855f7ef57781b79b51 template/Easy.pm.tmpl
+SHA1 6333c54cd70480a71e628e49c42551624f151f68 template/Easy.pm.tmpl
SHA1 b4841adcad866b70d9d72f171d3d0f8f9d5b3c79 template/Share.pm.tmpl
SHA1 468b011caaf4d54609b421027d7c6262a9260e89 typemap
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
-iF4EAREIAAYFAksrrC4ACgkQ9vEeIen/Zj4GswEAl8QU2W9k3rsyWMCP2Kfn0JXp
-Si/audyYpl6y592ug60A/1pLz1HUg29JBVunnnTbxbn51wNSz/xgzF6dOooHGL2C
-=bATu
+iF4EAREIAAYFAkwxBuEACgkQ9vEeIen/Zj5PcQEAhQQMhnYTxSPbAfJpQEzgkAKb
+OOmfT+ee84HR9sSr1akBAKE6L1eHzwf+WrrT2wLTHfTQfuP8OyYt6eM1Vw4Duvmj
+=T9bp
-----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=60053&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 5 01:30:44 2010
@@ -6,7 +6,7 @@
use DynaLoader;
BEGIN {
- $VERSION = '4.11';
+ $VERSION = '4.12';
@ISA = qw(DynaLoader);
__PACKAGE__->bootstrap;
}
@@ -169,6 +169,26 @@
$curl->setopt(CURLOPT_SHARE, $curlsh)
Attach share object to WWW::Curl::Easy instance
+=head1 WWW::Curl::Form
+
+ use WWW::Curl::Form;
+ my $curlf = WWW::Curl::Form->new;
+ $curlf->curl_formaddfile($filename, 'attachment', "multipart/form-data");
+ $curlf->curl_formadd("FIELDNAME", "VALUE");
+
+ $curl->setopt(CURLOPT_HTTPPOST, $curlf);
+
+Its usable methods are:
+
+ $curlf = new WWW::Curl::Form
+ This method constructs a new WWW::Curl::Form object.
+
+ $curlf->formadd(FIELDNAME, VALUE)
+ This method adds a field with a given value, to the form that is being submitted.
+
+ $curlf->formaddfile(FILENAME, DESCRIPTION, TYPE)
+ This method will add a file to the form. The description is the name of the field
+ that you form expects the data to be submitted in.
=head1 COMPATIBILITY
@@ -217,7 +237,11 @@
=item curl_formadd
-Not yet implemented.
+Seems to be working.
+
+=item curl_formaddfile
+
+Seems to be working.
=item curl_formfree
@@ -340,7 +364,7 @@
=head1 COPYRIGHT
-Copyright (C) 2000-2005,2008,2009 Daniel Stenberg, Cris Bailiff,
+Copyright (C) 2000-2005,2008-2010 Daniel Stenberg, Cris Bailiff,
Sebastian Riedel, Balint Szilakszi et al.
You may opt to use, copy, modify, merge, publish, distribute and/or sell
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=60053&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 5 01:30:44 2010
@@ -5,7 +5,7 @@
use Carp;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK $AUTOLOAD);
-$VERSION = '4.11';
+$VERSION = '4.12';
require WWW::Curl;
require Exporter;
@@ -22,6 +22,11 @@
$WWW::Curl::Easy::headers = "";
$WWW::Curl::Easy::content = "";
+
+sub const_string {
+ my ($self, $constant) = @_;
+ return constant($constant,0);
+}
sub AUTOLOAD {
Modified: branches/upstream/libwww-curl-perl/current/lib/WWW/Curl/Form.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-curl-perl/current/lib/WWW/Curl/Form.pm?rev=60053&op=diff
==============================================================================
--- branches/upstream/libwww-curl-perl/current/lib/WWW/Curl/Form.pm (original)
+++ branches/upstream/libwww-curl-perl/current/lib/WWW/Curl/Form.pm Mon Jul 5 01:30:44 2010
@@ -1,13 +1,32 @@
package WWW::Curl::Form;
use strict;
use warnings;
+use vars qw($VERSION @ISA @EXPORT @EXPORT_OK $AUTOLOAD);
-# In development!
-#
-#require WWW::Curl;
-#use vars qw(@ISA @EXPORT_OK);
-#require Exporter;
-#require AutoLoader;
-# @ISA = qw(Exporter DynaLoader);
+$VERSION = '4.12';
+
+require WWW::Curl;
+require Exporter;
+require AutoLoader;
+
+ at ISA = qw(Exporter DynaLoader);
+
+ at EXPORT = qw(
+CURLFORM_FILE
+CURLFORM_COPYNAME
+CURLFORM_CONTENTTYPE
+);
+
+sub AUTOLOAD {
+
+ # This AUTOLOAD is used to 'autoload' constants from the constant()
+ # XS function.
+
+ ( my $constname = $AUTOLOAD ) =~ s/.*:://;
+ return constant( $constname, 0 );
+}
1;
+
+__END__
+
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=60053&op=diff
==============================================================================
--- branches/upstream/libwww-curl-perl/current/t/01basic.t (original)
+++ branches/upstream/libwww-curl-perl/current/t/01basic.t Mon Jul 5 01:30:44 2010
@@ -49,7 +49,9 @@
SKIP: {
skip "Only testing cookies against google.com", 2 unless $url eq "http://www.google.com";
- my $cookies = $curl->getinfo(CURLINFO_COOKIELIST);
+ my $cookielist_const = $curl->const_string("CURLINFO_COOKIELIST");
+ skip "libcurl doesn't have the CURLINFO_COOKIELIST constant", 2 unless $cookielist_const;
+ my $cookies = $curl->getinfo($cookielist_const);
is(ref $cookies, "ARRAY", "Returned array reference");
ok(@$cookies > 0, "Got 1 or more cookies");
}
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=60053&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 5 01:30:44 2010
@@ -5,7 +5,7 @@
use Carp;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK $AUTOLOAD);
-$VERSION = '4.11';
+$VERSION = '4.12';
require WWW::Curl;
require Exporter;
@@ -23,6 +23,11 @@
$WWW::Curl::Easy::headers = "";
$WWW::Curl::Easy::content = "";
+
+sub const_string {
+ my ($self, $constant) = @_;
+ return constant($constant,0);
+}
sub AUTOLOAD {
More information about the Pkg-perl-cvs-commits
mailing list