Hello community, here is the log from the commit of package perl-autobox for openSUSE:Factory checked in at 2013-11-26 19:23:31 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-autobox (Old) and /work/SRC/openSUSE:Factory/.perl-autobox.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-autobox" Changes: -------- --- /work/SRC/openSUSE:Factory/perl-autobox/perl-autobox.changes 2013-06-21 13:10:57.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.perl-autobox.new/perl-autobox.changes 2013-11-26 19:23:32.000000000 +0100 @@ -1,0 +2,9 @@ +Tue Nov 26 07:35:37 UTC 2013 - [email protected] + +- updated to 2.82 + - simplify test to avoid portability woes + - fix failing test on Windows + - RT #71777: fix segfault in destructor called during global destruction (thanks, Tomas Doran) + - added t/rt_71777.t + +------------------------------------------------------------------- Old: ---- autobox-2.79.tar.gz New: ---- autobox-2.82.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-autobox.spec ++++++ --- /var/tmp/diff_new_pack.sPoglr/_old 2013-11-26 19:23:33.000000000 +0100 +++ /var/tmp/diff_new_pack.sPoglr/_new 2013-11-26 19:23:33.000000000 +0100 @@ -17,7 +17,7 @@ Name: perl-autobox -Version: 2.79 +Version: 2.82 Release: 0 %define cpan_name autobox Summary: call methods on native types @@ -46,6 +46,11 @@ (user-defined) implementation class (unless the method elects to bestow such a blessing) - they simply use its methods as though they are. +The classes (packages) into which the native types are boxed are fully +configurable. By default, a method invoked on a non-object value is assumed +to be defined in a class whose name corresponds to the 'ref()' type of that +value - or SCALAR if the value is a non-reference. + %prep %setup -q -n %{cpan_name}-%{version} ++++++ autobox-2.79.tar.gz -> autobox-2.82.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autobox-2.79/Changes new/autobox-2.82/Changes --- old/autobox-2.79/Changes 2013-04-30 22:25:20.000000000 +0200 +++ new/autobox-2.82/Changes 2013-10-26 04:09:45.000000000 +0200 @@ -1,13 +1,23 @@ Revision history for Perl extension autobox +2.82 Sat Oct 26 12:44:52 2013 + - simplify test to avoid portability woes + +2.81 Sat Oct 26 11:32:31 2013 + - fix failing test on Windows + +2.80 Fri Oct 25 19:32:12 2013 + - RT #71777: fix segfault in destructor called during global destruction (thanks, Tomas Doran) + - added t/rt_71777.t + 2.79 Tue Apr 30 21:22:05 2013 - allow import arguments to be passed as a hashref - - add t/import_hashref.t + - added t/import_hashref.t - doc tweaks 2.78 Tue Apr 30 18:53:54 2013 - - fix RT #80400 (thanks, Tokuhiro Matsuno) - - added t/rt_80400.t + - RT #80400: fix segfault in destructor called in END block (thanks, Tokuhiro Matsuno) + - added t/rt_80400.t 2.77 Thu Dec 13 19:59:48 2012 - doc tweaks @@ -35,17 +45,17 @@ 2.70 Wed Mar 17 19:27:44 2010 - replace autobox_can and autobox_isa with autobox_class this also fixes import, unimport and VERSION - - added t/version.t - - renamed t/universal.t => t/autobox_class.t + - added t/version.t + - renamed t/universal.t => t/autobox_class.t 2.60 Wed Mar 17 16:34:56 2010 - fix RT #46814 (thanks Tye McQueen) - - added t/rt_46814.t + - added t/rt_46814.t - fix RT #49273 (thanks Daniel Austin) - fix RT #55565 (thanks Schwern) - fix RT #55652 (thanks Schwern) - - $native->isa and $native->can must now be called as $native->autobox_isa and $native->autobox_can - - added t/rt_55652.t + - $native->isa and $native->can must now be called as $native->autobox_isa and $native->autobox_can + - added t/rt_55652.t 2.55 Sun May 25 03:20:54 2008 - fix MANIFEST again - restore Changes @@ -141,7 +151,6 @@ multiple bindings for each type can be supplied as an ARRAY ref of classes or namespaces "no autobox qw(...)" disables/resets bindings for the specified type(s) - - fixed incorrect bareword handling - perl 5.10 compatibility fixes (thanks Andreas Koenig) - document previously undocumented features diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autobox-2.79/MANIFEST new/autobox-2.82/MANIFEST --- old/autobox-2.79/MANIFEST 2013-04-30 22:55:08.000000000 +0200 +++ new/autobox-2.82/MANIFEST 2013-10-26 04:11:09.000000000 +0200 @@ -22,9 +22,9 @@ t/lib/Versioned.pm t/merge.t t/name.t -t/pod.t t/rt_46814.t t/rt_55652.t +t/rt_71777.t t/rt_80400.t t/scalar.t t/type.t diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autobox-2.79/META.json new/autobox-2.82/META.json --- old/autobox-2.79/META.json 2013-04-30 22:55:08.000000000 +0200 +++ new/autobox-2.82/META.json 2013-10-26 04:11:08.000000000 +0200 @@ -4,7 +4,7 @@ "chocolateboy <[email protected]>" ], "dynamic_config" : 1, - "generated_by" : "ExtUtils::MakeMaker version 6.62, CPAN::Meta::Converter version 2.112150", + "generated_by" : "ExtUtils::MakeMaker version 6.62, CPAN::Meta::Converter version 2.130880", "license" : [ "perl_5" ], @@ -22,12 +22,12 @@ "prereqs" : { "build" : { "requires" : { - "ExtUtils::MakeMaker" : 0 + "ExtUtils::MakeMaker" : "0" } }, "configure" : { "requires" : { - "ExtUtils::MakeMaker" : 0 + "ExtUtils::MakeMaker" : "0" } }, "runtime" : { @@ -42,5 +42,5 @@ "url" : "http://github.com/chocolateboy/autobox" } }, - "version" : "2.79" + "version" : "2.82" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autobox-2.79/META.yml new/autobox-2.82/META.yml --- old/autobox-2.79/META.yml 2013-04-30 22:55:08.000000000 +0200 +++ new/autobox-2.82/META.yml 2013-10-26 04:11:08.000000000 +0200 @@ -7,7 +7,7 @@ configure_requires: ExtUtils::MakeMaker: 0 dynamic_config: 1 -generated_by: 'ExtUtils::MakeMaker version 6.62, CPAN::Meta::Converter version 2.112150' +generated_by: 'ExtUtils::MakeMaker version 6.62, CPAN::Meta::Converter version 2.130880' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -21,4 +21,4 @@ Scope::Guard: 0.20 resources: repository: http://github.com/chocolateboy/autobox -version: 2.79 +version: 2.82 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autobox-2.79/README new/autobox-2.82/README --- old/autobox-2.79/README 2013-04-30 22:25:20.000000000 +0200 +++ new/autobox-2.82/README 2013-10-26 04:04:23.000000000 +0200 @@ -1,4 +1,4 @@ -autobox version 2.79 +autobox version 2.82 ==================== The autobox pragma allows methods to be called on integers, floats, strings, arrays, hashes, and code references in exactly the same manner as blessed references. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autobox-2.79/autobox.xs new/autobox-2.82/autobox.xs --- old/autobox-2.79/autobox.xs 2013-04-30 20:43:42.000000000 +0200 +++ new/autobox-2.82/autobox.xs 2013-10-26 04:04:23.000000000 +0200 @@ -290,12 +290,27 @@ return NULL; } +static void autobox_cleanup(pTHX_ void * unused) { + PERL_UNUSED_VAR(unused); /* silence warning */ + + if (AUTOBOX_OP_MAP) { + PTABLE_free(AUTOBOX_OP_MAP); + AUTOBOX_OP_MAP = NULL; + } +} + MODULE = autobox PACKAGE = autobox PROTOTYPES: ENABLE BOOT: -AUTOBOX_OP_MAP = PTABLE_new(); if (!AUTOBOX_OP_MAP) Perl_croak(aTHX_ "Can't initialize op map"); +/* XXX the BOOT section extends to the next blank line, so don't add one for readability */ +AUTOBOX_OP_MAP = PTABLE_new(); +if (AUTOBOX_OP_MAP) { + Perl_call_atexit(aTHX_ autobox_cleanup, NULL); +} else { + Perl_croak(aTHX_ "Can't initialize OP map"); +} void _enter() @@ -335,21 +350,6 @@ CODE: XSRETURN_UV(PTR2UV(GvHV(PL_hintgv))); -void -DESTROY(SV * sv) - PROTOTYPE:$ - CODE: - PERL_UNUSED_VAR(sv); /* silence warning */ - - if (autobox_old_ck_subr) { /* make sure we got as far as initializing it */ - PL_check[OP_ENTERSUB] = autobox_old_ck_subr; - } - - if (AUTOBOX_OP_MAP) { - PTABLE_free(AUTOBOX_OP_MAP); - AUTOBOX_OP_MAP = NULL; - } - MODULE = autobox PACKAGE = autobox::universal SV * diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autobox-2.79/lib/autobox.pm new/autobox-2.82/lib/autobox.pm --- old/autobox-2.79/lib/autobox.pm 2013-04-30 22:54:09.000000000 +0200 +++ new/autobox-2.82/lib/autobox.pm 2013-10-26 04:04:23.000000000 +0200 @@ -11,12 +11,7 @@ use Scope::Guard; use Storable; -our $VERSION = '2.79'; - -# Perform (XS) cleanup on global destruction (DESTROY is defined in autobox.xs). -# END blocks don't work for this: see https://rt.cpan.org/Ticket/Display.html?id=80400 -# according to perlvar, package variables are garbage collected after END blocks -our $__GLOBAL_DESTRUCTION_MONITOR__ = bless {}; +our $VERSION = '2.82'; XSLoader::load 'autobox', $VERSION; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autobox-2.79/lib/autobox.pod new/autobox-2.82/lib/autobox.pod --- old/autobox-2.79/lib/autobox.pod 2013-04-30 22:25:20.000000000 +0200 +++ new/autobox-2.82/lib/autobox.pod 2013-10-26 04:04:23.000000000 +0200 @@ -176,7 +176,7 @@ { ... }->$method3(); sub { ... }->$method4(); -A native type is only asociated with a class if the type => class mapping +A native type is only associated with a class if the type => class mapping is supplied in the C<use autobox> statement. Thus the following will not work: use autobox SCALAR => 'MyScalar'; @@ -661,7 +661,7 @@ =head1 VERSION -2.79 +2.82 =head1 SEE ALSO diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autobox-2.79/t/all.t new/autobox-2.82/t/all.t --- old/autobox-2.79/t/all.t 2012-11-21 15:47:27.000000000 +0100 +++ new/autobox-2.82/t/all.t 2013-10-26 04:04:23.000000000 +0200 @@ -609,38 +609,6 @@ is($code->autobox_class->isa('UNKNOWN'), '', 'isa UNKNOWN: $code'); } -# test VERSION - -=pod -{ - use autobox; - - is (3->VERSION(), 0.01, 'can: integer literal'); - is ((-3)->VERSION(), 0.01, 'can: negative integer literal'); - is ((+3)->VERSION(), 0.01, 'can: positive integer literal'); - is ($int->VERSION(), 0.01, 'can: $integer'); - - is (3.1415927->VERSION(), 0.01, 'can: float literal'); - is ((-3.1415927)->VERSION(), 0.01, 'can: negative float literal'); - is ((+3.1415927)->VERSION(), 0.01, 'can: positive float literal'); - is ($float->VERSION(), 0.01, 'can: $float'); - - is ('Hello, world'->VERSION(), 0.01, 'can: single quoted string literal'); - is ("Hello, world"->VERSION(), 0.01, 'can: double quoted string literal'); - is ($string->VERSION(), 0.01, 'can: $string'); - - is ([ 0 .. 9 ]->VERSION(), 0.01, 'can: ARRAY ref'); - is ($array->VERSION(), 0.01, 'can: $array'); - - is ({ 0 .. 9 }->VERSION(), 0.01, 'can: HASH ref'); - is ($hash->VERSION(), 0.01, 'can: $hash'); - - is ((\&add)->VERSION(), 0.01, 'can: CODE ref'); - is (sub { $_[0] + $_[1] }->VERSION(), 0.01, 'can: ANON sub'); - is ($code->VERSION(), 0.01, 'can: $code'); -} -=cut - # test undef: by default, undef shouldn't be autoboxed... { use autobox; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autobox-2.79/t/pod.t new/autobox-2.82/t/pod.t --- old/autobox-2.79/t/pod.t 2011-07-21 23:06:57.000000000 +0200 +++ new/autobox-2.82/t/pod.t 1970-01-01 01:00:00.000000000 +0100 @@ -1,10 +0,0 @@ -eval "use Test::Pod"; - -if ($@) { - print "1..0 # Skip Test::Pod not installed", $/; - exit; -} - -my @PODS = qw#../blib#; - -all_pod_files_ok(all_pod_files(@PODS)); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autobox-2.79/t/rt_71777.t new/autobox-2.82/t/rt_71777.t --- old/autobox-2.79/t/rt_71777.t 1970-01-01 01:00:00.000000000 +0100 +++ new/autobox-2.82/t/rt_71777.t 2013-10-26 04:04:23.000000000 +0200 @@ -0,0 +1,42 @@ +#!/usr/bin/env perl + +use strict; +use warnings; +use blib; + +# simplified version of the test case provided by Tomas Doran (t0m) +# https://rt.cpan.org/Ticket/Display.html?id=71777 + +# we need to do this manually. +# schwern++: http://www.nntp.perl.org/group/perl.qa/2013/01/msg13351.html +print '1..1', $/; + +{ + package Foo; + use autobox; + sub DESTROY { + # confirm a method compiled under "use autobox" doesn't segfault when + # called during global destruction. the "Can't call method" error is + # raised by perl's method call function (pp_method_named), which means + # our version correctly delegated to it, which means our version didn't + # segfault by trying to access the pointer table after it's been freed + eval { undef->bar }; + + if ($@ =~ /Can't call method "bar" on an undefined value/) { + print 'ok 1', $/; + } else { # if it doesn't work, we won't get here + print 'not ok 1', $/; + } + } +} + +{ + package Bar; + sub unused { } +} + +my $bar = bless {}, 'Bar'; +my $foo = bless {}, 'Foo'; + +$foo->{bar} = $bar; +$bar->{foo} = $foo; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autobox-2.79/t/rt_80400.t new/autobox-2.82/t/rt_80400.t --- old/autobox-2.79/t/rt_80400.t 2013-04-30 19:59:57.000000000 +0200 +++ new/autobox-2.82/t/rt_80400.t 2013-10-26 04:04:23.000000000 +0200 @@ -6,7 +6,7 @@ use strict; use warnings; -use Test::More; +use Test::More tests => 1; my $X; @@ -16,7 +16,6 @@ sub test { is_deeply(\@_, [ 1, 42 ], 'autoboxed method called in END block'); - done_testing; }; $X = sub { 1->test(42) }; -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
