Hello community,
here is the log from the commit of package perl-WWW-Curl for openSUSE:Factory
checked in at Mon Sep 6 18:01:24 CEST 2010.
--------
--- perl-WWW-Curl/perl-WWW-Curl.changes 2010-08-17 22:24:22.000000000 +0200
+++ perl-WWW-Curl/perl-WWW-Curl.changes 2010-09-04 20:05:30.000000000 +0200
@@ -1,0 +2,10 @@
+Sat Sep 4 18:03:23 UTC 2010 - chris@computersalat.de
+
+- update to 4.13
+ - Fixed WWW::Curl::Form (again, formadd and formaddfile working now).
+ - Made constant constant handling more robust and added tests [Fuji, Goro].
+ - Modernized *.pm and AUTOLOAD now throws an error on unknown method calls
+ [Fuji, Goro].
+ - Fixed code depending on CURLINFO_SLIST to be optional [Fuji, Goro].
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
WWW-Curl-4.12.tar.bz2
New:
----
WWW-Curl-4.13.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-WWW-Curl.spec ++++++
--- /var/tmp/diff_new_pack.by4QSq/_old 2010-09-06 17:57:35.000000000 +0200
+++ /var/tmp/diff_new_pack.by4QSq/_new 2010-09-06 17:57:35.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package perl-WWW-Curl (Version 4.12)
+# spec file for package perl-WWW-Curl (Version 4.13)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -21,7 +21,7 @@
Name: perl-WWW-Curl
%define cpan_name WWW-Curl
Summary: Perl extension interface for libcurl
-Version: 4.12
+Version: 4.13
Release: 1
License: MPL or MIT/X-derivate
Group: Development/Libraries/Perl
++++++ WWW-Curl-4.12.tar.bz2 -> WWW-Curl-4.13.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/WWW-Curl-4.12/Changes new/WWW-Curl-4.13/Changes
--- old/WWW-Curl-4.12/Changes 2010-07-04 23:57:26.000000000 +0200
+++ new/WWW-Curl-4.13/Changes 2010-09-01 23:29:07.000000000 +0200
@@ -1,4 +1,11 @@
Revision history for the Perl binding of libcurl, WWW::Curl.
+4.13 Wed Sep 01 2010: - Balint Szilakszi <szbalint at cpan.org>
+
+ - Fixed WWW::Curl::Form (again, formadd and formaddfile working now).
+ - Made constant constant handling more robust and added tests [Fuji, Goro].
+ - Modernized *.pm and AUTOLOAD now throws an error on unknown method calls [Fuji, Goro].
+ - Fixed code depending on CURLINFO_SLIST to be optional [Fuji, Goro].
+
4.12 Sun Jun 04 2010: - Balint Szilakszi <szbalint at cpan.org>
- Fixed WWW::Curl::Form (patch contributed by Michael Ing).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/WWW-Curl-4.12/Curl.xs new/WWW-Curl-4.13/Curl.xs
--- old/WWW-Curl-4.12/Curl.xs 2010-07-04 22:22:53.000000000 +0200
+++ new/WWW-Curl-4.13/Curl.xs 2010-09-01 23:04:29.000000000 +0200
@@ -280,9 +280,8 @@
void *call_function,
void *call_ctx)
{
- dSP;
-
if (call_function) { /* We are doing a callback to perl */
+ dSP;
int count, status;
ENTER;
@@ -587,9 +586,8 @@
PROTOTYPES: ENABLE
int
-constant(name,arg)
+constant(name)
char * name
- int arg
void
@@ -908,6 +906,7 @@
RETVAL = newSVnv(vdouble);
break;
}
+#ifdef CURLINFO_SLIST
case CURLINFO_SLIST:
{
struct curl_slist *vlist, *entry;
@@ -924,6 +923,7 @@
RETVAL = newRV(sv_2mortal((SV *) items));
break;
}
+#endif /* CURLINFO_SLIST */
default: {
RETVAL = newSViv(CURLE_BAD_FUNCTION_ARGUMENT);
break;
@@ -976,9 +976,8 @@
MODULE = WWW::Curl PACKAGE = WWW::Curl::Form PREFIX = curl_form_
int
-constant(name,arg)
+constant(name)
char * name
- int arg
void
curl_form_new(...)
@@ -1000,7 +999,7 @@
XSRETURN(1);
void
-curl_formadd(self,name,value)
+curl_form_formadd(self,name,value)
WWW::Curl::Form self
char *name
char *value
@@ -1011,7 +1010,7 @@
CURLFORM_END);
void
-curl_formaddfile(self,filename,description,type)
+curl_form_formaddfile(self,filename,description,type)
WWW::Curl::Form self
char *filename
char *description
@@ -1193,9 +1192,8 @@
PROTOTYPES: ENABLE
int
-constant(name,arg)
+constant(name)
char * name
- int arg
void
curl_share_new(...)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/WWW-Curl-4.12/MANIFEST new/WWW-Curl-4.13/MANIFEST
--- old/WWW-Curl-4.12/MANIFEST 2009-12-18 15:21:01.000000000 +0100
+++ new/WWW-Curl-4.13/MANIFEST 2010-09-01 23:38:51.000000000 +0200
@@ -36,6 +36,7 @@
t/17slist.t
t/18twinhandles.t
t/19multi.t
+t/20undefined_subs.t
t/meta.t
t/new/00constants.t
t/new/01basic.t
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/WWW-Curl-4.12/META.yml new/WWW-Curl-4.13/META.yml
--- old/WWW-Curl-4.12/META.yml 2010-07-05 00:26:00.000000000 +0200
+++ new/WWW-Curl-4.13/META.yml 2010-09-01 23:46:54.000000000 +0200
@@ -24,4 +24,4 @@
perl: 5.6.1
resources:
repository: http://github.com/szbalint/WWW--Curl
-version: 4.12
+version: 4.13
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/WWW-Curl-4.12/Makefile.PL new/WWW-Curl-4.13/Makefile.PL
--- old/WWW-Curl-4.12/Makefile.PL 2010-07-04 22:22:53.000000000 +0200
+++ new/WWW-Curl-4.13/Makefile.PL 2010-09-01 22:05:36.000000000 +0200
@@ -131,7 +131,7 @@
# boilerplate xs constant function here
print CURL_XS <http://github.com/szbalint/WWW--Curl/tree .
-Copyright (C) 2000-2005, 2008-2009 Daniel Stenberg, Cris Bailiff, Bálint Szilakszi, et al.
+Copyright (C) 2000-2005, 2008-2010 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
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/WWW-Curl-4.12/SIGNATURE new/WWW-Curl-4.13/SIGNATURE
--- old/WWW-Curl-4.12/SIGNATURE 2010-07-05 00:10:45.000000000 +0200
+++ new/WWW-Curl-4.13/SIGNATURE 2010-09-01 23:38:59.000000000 +0200
@@ -14,13 +14,13 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
-SHA1 e5832a6de950df4208e57c3b5ce5978e867df5df Changes
-SHA1 cc58e04a4fb86d0ad8ef6abb882b515648ef4c9e Curl.xs
+SHA1 57dd37a044ec3932167e144e5c6243530c659c8e Changes
+SHA1 a5b3c8d879c0a839e1950c9f6f46d82ebe806e4f Curl.xs
SHA1 94cbea5b3fb940e25cd4535d1c81bfd7d51dac3c LICENSE
-SHA1 a33cdbb8996d5b8dfc92da6d34e7327ebde1b1c5 MANIFEST
-SHA1 6455def3635ae5d2c55e853a61f7c21acc6637d6 META.yml
-SHA1 bf0ea5c3c087f69376656276fffea8524b02323f Makefile.PL
-SHA1 a21d7184f91692fb3d6d7175e4a526f9d99fe3c7 README
+SHA1 8685dd652f68b7283809bf28a6d5478ed6f6c19a MANIFEST
+SHA1 929ba34ad51060a0aac41ce7f2114bc68b444988 META.yml
+SHA1 754b95eb93ec7fb5d0922e7030742fc0de1f196b Makefile.PL
+SHA1 3e8bbd9aa6cd273aef05f78cfef0116a0e3d59b0 README
SHA1 ed6f9f399075307a33bd02902ebbadbbbfbd8bab README.Win32
SHA1 fd5f3c4f0418efee3b9b16cf8c3902e8374909df inc/Module/Install.pm
SHA1 7cd7c349afdf3f012e475507b1017bdfa796bfbd inc/Module/Install/Base.pm
@@ -29,11 +29,11 @@
SHA1 dbec1085a29a855202ee797a5bac319cf426827f inc/Module/Install/MakeMaker.pm
SHA1 3e83972921d54198d1246f7278f08664006cd65d inc/Module/Install/Makefile.pm
SHA1 12bf1867955480d47d5171a9e9c6a96fabe0b58f inc/Module/Install/Metadata.pm
-SHA1 5d57332dcfd0ee1be67873be520d4371e7bf7262 lib/WWW/Curl.pm
-SHA1 6c3fd8228370ae898e4e0fefcc280aeea9c097fe lib/WWW/Curl/Easy.pm
-SHA1 7ff51363b45f28c4fabc5888c64515eb7f450ae6 lib/WWW/Curl/Form.pm
+SHA1 2080f924fe9ec9c2852fcb9657967ff98b2bb78f lib/WWW/Curl.pm
+SHA1 d6a5f950e177856a7d4e93484652784f15cb303a lib/WWW/Curl/Easy.pm
+SHA1 e1693d1264812c85800b61a2131f1822ec7c54a7 lib/WWW/Curl/Form.pm
SHA1 0bddc700447a50dd26d13119ee60349556ce1811 lib/WWW/Curl/Multi.pm
-SHA1 bcf4bc64399691f1871b9592ced73ce5fef86fea lib/WWW/Curl/Share.pm
+SHA1 08df49894fc724e358676a80ca7cd3895bc30b9a lib/WWW/Curl/Share.pm
SHA1 802cb1fcd35fe78e4cdb10164a05e54ce1427543 t/00constants.t
SHA1 88c7780f18aab350318bd8c6d887558a4ce17519 t/01basic.t
SHA1 07b63b1baca142a0e34e79633d0eb57684524bed t/02callbacks.t
@@ -51,6 +51,7 @@
SHA1 e784a874eb36fd5b16a12fc58365cce697ecbbab t/17slist.t
SHA1 9b80d6de1675261d43abea2f76cfd610f42a4494 t/18twinhandles.t
SHA1 7c7e12a6a5afa9afaec967958e1396d41f2697c8 t/19multi.t
+SHA1 42f7f35d7ac8b38838cc71fdc7a89402b63e01b7 t/20undefined_subs.t
SHA1 2924361d0713031b92c6b888f11e860d357837f7 t/meta.t
SHA1 3cd20c1711b43058550922404f53a844fb2695e6 t/new/00constants.t
SHA1 d9863d2e71f618a58d419534867cda8bd97dcfbf t/new/01basic.t
@@ -66,13 +67,13 @@
SHA1 20ec0bd03ff2600505d38623153a6eb3087b5814 t/new/README
SHA1 ac25bfa56d36f19cbee72a968b06372e88602a61 t/pod-coverage.t
SHA1 0190346d7072d458c8a10a45c19f86db641dcc48 t/pod.t
-SHA1 6333c54cd70480a71e628e49c42551624f151f68 template/Easy.pm.tmpl
-SHA1 b4841adcad866b70d9d72f171d3d0f8f9d5b3c79 template/Share.pm.tmpl
+SHA1 79c2627afc7d7671fbd545527a19a9622fcd8f11 template/Easy.pm.tmpl
+SHA1 f690cca3adf6c17840985fe40c22ee56fdfb999f template/Share.pm.tmpl
SHA1 468b011caaf4d54609b421027d7c6262a9260e89 typemap
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
-iF4EAREIAAYFAkwxBuEACgkQ9vEeIen/Zj5PcQEAhQQMhnYTxSPbAfJpQEzgkAKb
-OOmfT+ee84HR9sSr1akBAKE6L1eHzwf+WrrT2wLTHfTQfuP8OyYt6eM1Vw4Duvmj
-=T9bp
+iF4EAREIAAYFAkx+x+0ACgkQ9vEeIen/Zj6WxwD/VfQCOWg+9egne6NNWMllAE0j
+i+i7r/CAEaQWywuXU7YBAIJnxLu9qN0XUqm/Xuxj6cd4YBofXhsQseXjAHMPc82d
+=0s0r
-----END PGP SIGNATURE-----
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/WWW-Curl-4.12/lib/WWW/Curl/Easy.pm new/WWW-Curl-4.13/lib/WWW/Curl/Easy.pm
--- old/WWW-Curl-4.12/lib/WWW/Curl/Easy.pm 2010-07-05 00:26:03.000000000 +0200
+++ new/WWW-Curl-4.13/lib/WWW/Curl/Easy.pm 2010-09-01 23:47:00.000000000 +0200
@@ -3,21 +3,19 @@
use strict;
use warnings;
use Carp;
-use vars qw($VERSION @ISA @EXPORT @EXPORT_OK $AUTOLOAD);
-$VERSION = '4.12';
+our $VERSION = '4.13';
-require WWW::Curl;
-require Exporter;
-require AutoLoader;
+use WWW::Curl ();
+use Exporter ();
-@ISA = qw(Exporter DynaLoader);
+our @ISA = qw(Exporter);
# Items to export into callers namespace by default. Note: do not export
# names by default without a very good reason. Use EXPORT_OK instead.
# Do not simply export all your public functions/methods/constants.
-@EXPORT = qw(
+our @EXPORT = qw(
);
$WWW::Curl::Easy::headers = "";
@@ -25,16 +23,25 @@
sub const_string {
my ($self, $constant) = @_;
- return constant($constant,0);
+ return constant($constant);
}
sub AUTOLOAD {
-
+ our $AUTOLOAD;
# This AUTOLOAD is used to 'autoload' constants from the constant()
# XS function.
( my $constname = $AUTOLOAD ) =~ s/.*:://;
- return constant( $constname, 0 );
+ my $value = constant( $constname );
+ if($!) {
+ croak("Undefined subroutine &$AUTOLOAD called");
+ }
+
+ {
+ no strict 'refs';
+ *{$AUTOLOAD} = sub { $value };
+ }
+ return $value;
}
1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/WWW-Curl-4.12/lib/WWW/Curl/Form.pm new/WWW-Curl-4.13/lib/WWW/Curl/Form.pm
--- old/WWW-Curl-4.12/lib/WWW/Curl/Form.pm 2010-07-05 00:25:45.000000000 +0200
+++ new/WWW-Curl-4.13/lib/WWW/Curl/Form.pm 2010-09-01 23:36:50.000000000 +0200
@@ -1,29 +1,37 @@
package WWW::Curl::Form;
use strict;
use warnings;
-use vars qw($VERSION @ISA @EXPORT @EXPORT_OK $AUTOLOAD);
+use Carp;
-$VERSION = '4.12';
+our $VERSION = '4.13';
-require WWW::Curl;
-require Exporter;
-require AutoLoader;
+use WWW::Curl ();
+use Exporter ();
-@ISA = qw(Exporter DynaLoader);
+our @ISA = qw(Exporter);
-@EXPORT = qw(
+our @EXPORT = qw(
CURLFORM_FILE
CURLFORM_COPYNAME
CURLFORM_CONTENTTYPE
);
sub AUTOLOAD {
-
+ our $AUTOLOAD;
# This AUTOLOAD is used to 'autoload' constants from the constant()
# XS function.
( my $constname = $AUTOLOAD ) =~ s/.*:://;
- return constant( $constname, 0 );
+ my $value = constant( $constname );
+ if($!) {
+ croak("Undefined subroutine &$AUTOLOAD caclled");
+ }
+
+ {
+ no strict 'refs';
+ *{$AUTOLOAD} = sub { $value };
+ }
+ return $value;
}
1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/WWW-Curl-4.12/lib/WWW/Curl/Share.pm new/WWW-Curl-4.13/lib/WWW/Curl/Share.pm
--- old/WWW-Curl-4.12/lib/WWW/Curl/Share.pm 2010-07-05 00:26:03.000000000 +0200
+++ new/WWW-Curl-4.13/lib/WWW/Curl/Share.pm 2010-09-01 23:47:00.000000000 +0200
@@ -3,24 +3,31 @@
use strict;
use warnings;
use Carp;
-use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD);
-use WWW::Curl;
-require Exporter;
-require AutoLoader;
+use WWW::Curl ();
+use Exporter ();
-@ISA = qw(Exporter DynaLoader);
+our @ISA = qw(Exporter);
-@EXPORT = qw(
+our @EXPORT = qw(
);
sub AUTOLOAD {
-
+ our $AUTOLOAD;
# This AUTOLOAD is used to 'autoload' constants from the constant()
# XS function.
( my $constname = $AUTOLOAD ) =~ s/.*:://;
- return constant( $constname, 0 );
+ my $value = constant( $constname );
+ if($!) {
+ croak("Undefined subroutine &$AUTOLOAD failed");
+ }
+
+ {
+ no strict 'refs';
+ *{$AUTOLOAD} = sub { $value };
+ }
+ return $value;
}
1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/WWW-Curl-4.12/lib/WWW/Curl.pm new/WWW-Curl-4.13/lib/WWW/Curl.pm
--- old/WWW-Curl-4.12/lib/WWW/Curl.pm 2010-07-05 00:25:45.000000000 +0200
+++ new/WWW-Curl-4.13/lib/WWW/Curl.pm 2010-09-01 23:36:10.000000000 +0200
@@ -2,14 +2,10 @@
use strict;
use warnings;
-use vars qw(@ISA $VERSION);
-use DynaLoader;
+use XSLoader;
-BEGIN {
- $VERSION = '4.12';
- @ISA = qw(DynaLoader);
- __PACKAGE__->bootstrap;
-}
+our $VERSION = '4.13';
+XSLoader::load(__PACKAGE__, $VERSION);
END {
_global_cleanup();
@@ -173,8 +169,8 @@
use WWW::Curl::Form;
my $curlf = WWW::Curl::Form->new;
- $curlf->curl_formaddfile($filename, 'attachment', "multipart/form-data");
- $curlf->curl_formadd("FIELDNAME", "VALUE");
+ $curlf->formaddfile($filename, 'attachment', "multipart/form-data");
+ $curlf->formadd("FIELDNAME", "VALUE");
$curl->setopt(CURLOPT_HTTPPOST, $curlf);
@@ -245,8 +241,8 @@
=item curl_formfree
-When WWW::Curl::Form support is added, this function will be used internally,
-but won't be accessible from the public API.
+Used internally. Not exposed through the public API, as this call has no relevance
+to Perl code.
=item curl_free
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/WWW-Curl-4.12/t/20undefined_subs.t new/WWW-Curl-4.13/t/20undefined_subs.t
--- old/WWW-Curl-4.12/t/20undefined_subs.t 1970-01-01 01:00:00.000000000 +0100
+++ new/WWW-Curl-4.13/t/20undefined_subs.t 2010-09-01 22:05:36.000000000 +0200
@@ -0,0 +1,20 @@
+#!perl -w
+use strict;
+use Test::More tests => 4;
+
+use WWW::Curl::Easy;
+use WWW::Curl::Share;
+use WWW::Curl::Multi;
+use WWW::Curl::Form;
+
+eval { WWW::Curl::Easy->no_such_method0 };
+like $@, qr/\b no_such_method0 \b/xms;
+
+eval { WWW::Curl::Share->no_such_method1 };
+like $@, qr/\b no_such_method1 \b/xms;
+
+eval { WWW::Curl::Multi->no_such_method2 };
+like $@, qr/\b no_such_method2 \b/xms;
+
+eval { WWW::Curl::Form->no_such_method3 };
+like $@, qr/\b no_such_method3 \b/xms;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/WWW-Curl-4.12/template/Easy.pm.tmpl new/WWW-Curl-4.13/template/Easy.pm.tmpl
--- old/WWW-Curl-4.12/template/Easy.pm.tmpl 2010-07-05 00:04:30.000000000 +0200
+++ new/WWW-Curl-4.13/template/Easy.pm.tmpl 2010-09-01 23:36:20.000000000 +0200
@@ -3,21 +3,19 @@
use strict;
use warnings;
use Carp;
-use vars qw($VERSION @ISA @EXPORT @EXPORT_OK $AUTOLOAD);
-$VERSION = '4.12';
+our $VERSION = '4.13';
-require WWW::Curl;
-require Exporter;
-require AutoLoader;
+use WWW::Curl ();
+use Exporter ();
-@ISA = qw(Exporter DynaLoader);
+our @ISA = qw(Exporter);
# Items to export into callers namespace by default. Note: do not export
# names by default without a very good reason. Use EXPORT_OK instead.
# Do not simply export all your public functions/methods/constants.
-@EXPORT = qw(
+our @EXPORT = qw(
@CURLOPT_INCLUDE@
);
@@ -26,16 +24,25 @@
sub const_string {
my ($self, $constant) = @_;
- return constant($constant,0);
+ return constant($constant);
}
sub AUTOLOAD {
-
+ our $AUTOLOAD;
# This AUTOLOAD is used to 'autoload' constants from the constant()
# XS function.
( my $constname = $AUTOLOAD ) =~ s/.*:://;
- return constant( $constname, 0 );
+ my $value = constant( $constname );
+ if($!) {
+ croak("Undefined subroutine &$AUTOLOAD called");
+ }
+
+ {
+ no strict 'refs';
+ *{$AUTOLOAD} = sub { $value };
+ }
+ return $value;
}
1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/WWW-Curl-4.12/template/Share.pm.tmpl new/WWW-Curl-4.13/template/Share.pm.tmpl
--- old/WWW-Curl-4.12/template/Share.pm.tmpl 2009-02-12 00:30:22.000000000 +0100
+++ new/WWW-Curl-4.13/template/Share.pm.tmpl 2010-09-01 22:05:36.000000000 +0200
@@ -3,25 +3,32 @@
use strict;
use warnings;
use Carp;
-use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD);
-use WWW::Curl;
-require Exporter;
-require AutoLoader;
+use WWW::Curl ();
+use Exporter ();
-@ISA = qw(Exporter DynaLoader);
+our @ISA = qw(Exporter);
-@EXPORT = qw(
+our @EXPORT = qw(
@CURLSHOPT_INCLUDE@
);
sub AUTOLOAD {
-
+ our $AUTOLOAD;
# This AUTOLOAD is used to 'autoload' constants from the constant()
# XS function.
( my $constname = $AUTOLOAD ) =~ s/.*:://;
- return constant( $constname, 0 );
+ my $value = constant( $constname );
+ if($!) {
+ croak("Undefined subroutine &$AUTOLOAD failed");
+ }
+
+ {
+ no strict 'refs';
+ *{$AUTOLOAD} = sub { $value };
+ }
+ return $value;
}
1;
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org