Hello community, here is the log from the commit of package perl-autobox for openSUSE:Factory checked in at 2018-04-26 13:38:07 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-autobox (Old) and /work/SRC/openSUSE:Factory/.perl-autobox.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-autobox" Thu Apr 26 13:38:07 2018 rev:15 rq:599898 version:2.86 Changes: -------- --- /work/SRC/openSUSE:Factory/perl-autobox/perl-autobox.changes 2017-03-28 15:20:58.364183623 +0200 +++ /work/SRC/openSUSE:Factory/.perl-autobox.new/perl-autobox.changes 2018-04-26 13:38:08.891823252 +0200 @@ -1,0 +2,15 @@ +Sat Apr 21 06:07:47 UTC 2018 - co...@suse.com + +- updated to 2.86 + see /usr/share/doc/packages/perl-autobox/Changes + + 2.86 Fri 20 Apr 20:07:29 2018 + + - GH #9: fix bug which prevented autoboxing working + under the debugger on perl 5.22+ (thanks, skington) + - added t/debugger.t + - GH #8: fix bug which prevented bareword method-calls being + exempted when the method is a variable e.g. Foo->$bar + - add operator-overloading note to the gotchas section (GH #7) + +------------------------------------------------------------------- Old: ---- autobox-2.85.tar.gz New: ---- autobox-2.86.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-autobox.spec ++++++ --- /var/tmp/diff_new_pack.kezOsq/_old 2018-04-26 13:38:09.999782643 +0200 +++ /var/tmp/diff_new_pack.kezOsq/_new 2018-04-26 13:38:09.999782643 +0200 @@ -1,7 +1,7 @@ # # spec file for package perl-autobox # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,11 +17,11 @@ Name: perl-autobox -Version: 2.85 +Version: 2.86 Release: 0 %define cpan_name autobox Summary: Call Methods On Native Types -License: Artistic-1.0 or GPL-1.0+ +License: Artistic-2.0 Group: Development/Libraries/Perl Url: http://search.cpan.org/dist/autobox/ Source0: https://cpan.metacpan.org/authors/id/C/CH/CHOCOLATE/%{cpan_name}-%{version}.tar.gz @@ -29,6 +29,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl BuildRequires: perl-macros +BuildRequires: perl(IPC::System::Simple) >= 1.25 BuildRequires: perl(Scope::Guard) >= 0.21 Requires: perl(Scope::Guard) >= 0.21 %{perl_requires} @@ -65,5 +66,6 @@ %files -f %{name}.files %defattr(-,root,root,755) %doc Changes README +%license LICENSE.md %changelog ++++++ autobox-2.85.tar.gz -> autobox-2.86.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autobox-2.85/Changes new/autobox-2.86/Changes --- old/autobox-2.85/Changes 2017-02-27 19:18:45.000000000 +0100 +++ new/autobox-2.86/Changes 2018-04-20 22:15:44.000000000 +0200 @@ -1,5 +1,14 @@ Revision history for Perl extension autobox +2.86 Fri 20 Apr 20:07:29 2018 + + - GH #9: fix bug which prevented autoboxing working + under the debugger on perl 5.22+ (thanks, skington) + - added t/debugger.t + - GH #8: fix bug which prevented bareword method-calls being + exempted when the method is a variable e.g. Foo->$bar + - add operator-overloading note to the gotchas section (GH #7) + 2.85 Mon 27 Feb 18:18:19 2017 - fix failing test under 5.25.10 with -Ddefault_inc_excludes_dot @@ -7,15 +16,16 @@ 2.84 Fri 26 Aug 20:35:48 2016 - - compatibility fix for perl >= 5.25 (thanks, mat813, karenetheridge and eserte) + - compatibility fix for perl >= 5.25 + (thanks, mat813, karenetheridge and eserte) - update ppport.h from 3.20 to 3.35 - - add .travis.yml 2.83 Sun Feb 1 21:34:01 2015 - - RT #100247: fix assertion failures on 5.21.x perls with -DDEBUGGING - (thanks, ilmari and Father Chrysostomos) - - RT #100717: don't hide autobox::universal from PAUSE (thanks, ppisar) + - RT #100247: fix assertion failures on 5.21.x perls + with -DDEBUGGING (thanks, ilmari and Father Chrysostomos) + - RT #100717: don't hide autobox::universal from PAUSE + (thanks, ppisar) - RT #89754: INSTALLDIRS fix (thanks, Kent Fredric) 2.82 Sat Oct 26 12:44:52 2013 @@ -28,7 +38,8 @@ 2.80 Fri Oct 25 19:32:12 2013 - - RT #71777: fix segfault in destructor called during global destruction (thanks, Tomas Doran) + - RT #71777: fix segfault in destructor called during + global destruction (thanks, Tomas Doran) - added t/rt_71777.t - fix doc typo (thanks, David Steinbrunner) @@ -40,17 +51,19 @@ 2.78 Tue Apr 30 18:53:54 2013 - - RT #80400: fix segfault in destructor called in END block (thanks, Tokuhiro Matsuno) + - 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 - - add multiple-arg autoref tests + - add multiple-arg auto-ref tests 2.76 Wed Nov 21 14:35:33 2012 - - fix breaking tests in perl >= 5.17.5: update error message pattern (thanks, rjbs) + - fix breaking tests in perl >= 5.17.5: update error + message pattern (thanks, rjbs) - update ppport.h from 3.19 to 3.20 2.75 Thu Jul 21 22:07:26 2011 @@ -67,7 +80,7 @@ 2.72 Fri Jan 28 12:16:34 2011 - - fix conflict with use re 'taint' (thanks, Peter Rabbitson) + - fix conflict with `use re "taint"` (thanks, Peter Rabbitson) 2.71 Thu Sep 23 02:28:10 2010 @@ -75,19 +88,20 @@ 2.70 Wed Mar 17 19:27:44 2010 - - replace autobox_can and autobox_isa with autobox_class + - 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 + - renamed t/universal.t -> t/autobox_class.t 2.60 Wed Mar 17 16:34:56 2010 - - fix RT #46814 (thanks Tye McQueen) + - fix RT #46814 (thanks, Tye McQueen) - 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 + - 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 2.55 Sun May 25 03:20:54 2008 @@ -105,7 +119,7 @@ - moved autobox::type method to autobox::universal::type subroutine - added export.t - added t/default.t - - portability fix for non-gcc compilers (thanks chris) + - portability fix for non-gcc compilers (thanks, chris) - misc code/documentation fixes/cleanups 2.52 Tue May 20 12:24:01 2008 @@ -114,10 +128,11 @@ 2.51 Tue May 20 10:40:32 2008 - - fix type identification for former INTEGERs and FLOATs (thanks Mitchell N Charity) + - fix type identification for former INTEGERs and FLOATs + (thanks, Mitchell N Charity) - added type.t - - fix for perl 5.11 (thanks Andreas Koenig) - - document eval EXPR gotcha + - fix for perl 5.11 (thanks, Andreas Koenig) + - document `eval EXPR` gotcha 2.50 Mon May 19 17:39:22 2008 @@ -138,19 +153,22 @@ 2.41 Tue May 13 20:02:37 2008 - - work around $value->$method segfault with non-string method names under perls <= 5.8.8 + - work around $value->$method segfault with non-string method + names under perls <= 5.8.8 - added license info 2.40 Mon May 12 23:51:26 2008 - - support @array and %hash (thanks Yuval Kogman (nothingmuch) and Matthijs van Duin (xmath)) + - support @array and %hash (thanks, Yuval Kogman (nothingmuch) + and Matthijs van Duin (xmath)) - added t/autoref.t - - fix $value->$method segfault with undef, integer, float &c. (i.e. non-string) - method names (thanks John Goulah) + - fix $value->$method segfault with undef, integer, float &c. + (i.e. non-string) method names (thanks, John Goulah) 2.30 Fri May 9 01:52:19 2008 - - support $value->$method, where $method is a method name or subroutine reference: + - support $value->$method, where $method is a method name or + subroutine reference: - added t/name.t - added t/coderef.t @@ -175,14 +193,14 @@ 2.11 Wed Feb 20 21:06:25 2008 - - Windows portability fix: ANSIfy C99-ism (thanks Taro Nishino) + - Windows portability fix: ANSIfy C99-ism (thanks, Taro Nishino) - revert broken micro-optimization 2.10 Wed Feb 20 02:16:42 2008 - - fix + tests: - unimport - default namespace(s) in an array ref + - fix + add tests for: + - unimport + - default namespace(s) in an array ref 2.02 Sun Feb 17 16:59:28 2008 @@ -192,26 +210,28 @@ 2.01 Sun Feb 17 03:56:22 2008 - documentation fix: - rm reference to $class->SUPER::import(TYPE => __PACKAGE__) - and explain why an auxiliary class should be used + - rm reference to $class->SUPER::import(TYPE => __PACKAGE__) + and explain why an auxiliary class should be used 2.00 Sun Feb 17 02:29:11 2008 - API changes: - autobox with one or more args leaves the unspecified types unboxed - multiple autobox (or autobox subclass) invocations in the same lexical scope - are merged (thanks Matsuno Tokuhiro) - 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) + - autobox with one or more args leaves the unspecified + types unboxed + - multiple autobox (or autobox subclass) invocations + in the same lexical scope are merged (thanks, Matsuno Tokuhiro) + - 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 + - perl 5.10 compatibility fixes (thanks, Andreas Koenig) + - document previously-undocumented features - document subclassing - merge.t: test merging - beef up the default DEBUG handler so that it shows the superclasses of the synthetic classes - - Windows compatibilty fix (thanks Alexandr Ciornii) + - Windows compatibilty fix (thanks, Alexandr Ciornii) - misc optimizations, cleanups 1.22 Sun Sep 23 22:27:44 2007 @@ -220,12 +240,14 @@ 1.21 Sun Sep 23 20:35:37 2007 - - (Makefile): fix build failure on Windows (thanks Alexandr Ciornii) + - (Makefile): fix build failure on Windows (thanks, Alexandr Ciornii) 1.20 Sun Sep 23 14:05:39 2007 - - (ptable.h): fix build failures on perl >= 5.9.3 (thanks Andreas Koenig) - - (Perl_pp_method_named): fix build failure on Windows (thanks randyk and Alexandr Ciornii) + - (ptable.h): fix build failures on perl >= 5.9.3 + (thanks, Andreas Koenig) + - (Perl_pp_method_named): fix build failure on Windows + (thanks, randyk and Alexandr Ciornii) 1.10 Thu Nov 23 20:32:53 2006 @@ -238,7 +260,8 @@ 1.04 Mon Nov 20 00:25:50 2006 - fix threaded perl pessimization - - applied patch: http://rt.cpan.org/Public/Bug/Display.html?id=22868 (thanks Steve Peters) + - applied patch: http://rt.cpan.org/Public/Bug/Display.html?id=22868 + (thanks, Steve Peters) - documentation fixlet - portability fixlet @@ -253,7 +276,8 @@ 1.01 Tue Apr 12 19:58:49 2005 - - compatibility/portability fixes + isolate ptr table from perl's implementation + - compatibility/portability fixes + isolate ptr table + from perl's implementation 1.00 Tue Apr 12 01:16:52 2005 @@ -273,46 +297,50 @@ 0.08 Fri Oct 17 11:50:34 2003 - - removed obsolete references to perl-5.8.1-RC4 from README + - removed obsolete references to perl-5.8.1-RC4 + from README 0.07 Tue Oct 14 13:34:16 2003 - - updated patch to work against perl-5.8.1. This patch should be - applied to a clean perl-5.8.1 tree. Previous versions of perl are - no longer supported + - updated patch to work against perl-5.8.1. This + patch should be applied to a clean perl-5.8.1 tree. + previous versions of perl are no longer supported - minor documentation tweaklets - - added typemap() static method to autobox.pm to facilitate subclassing + - added typemap() static method to autobox.pm to + facilitate subclassing 0.06 Mon Aug 18 17:40:53 2003 - - This version provides an updated patch. It should be applied to a - clean perl-5.8.1-RC4 tree - - Thanks to Tassilo von Parseval for hunting down and fixing a - memory leak - - Added support for builtin pseudotype, UNDEF - - Added tests and documentation for old VERSION() and new UNDEF - features + - this version provides an updated patch. it should be + applied to a clean perl-5.8.1-RC4 tree + - thanks to Tassilo von Parseval for hunting down + and fixing a memory leak + - added support for builtin pseudotype, UNDEF + - added tests and documentation for old VERSION() and + new UNDEF features 0.05 Mon Aug 11 03:13:04 2003 - autobox.pm update: no change to the patch - - Cleaned up implementation of isa() and can() - - Added support for VERSION() (untested) + - cleaned up implementation of isa() and can() + - added support for VERSION() (untested) 0.04 Sun Aug 10 14:57:18 2003 - - This version provides a new patch which ensures - that undef values aren't autoboxed. It should + - this version provides a new patch which ensures + that undef values aren't autoboxed. it should be applied to a clean perl-5.8.1-RC4 tree - - fixed (i.e. prevented) autoboxing of undef in isa() and can() + - fixed (i.e. prevented) autoboxing of undef in + isa() and can() - fixed Makefile.PL and META.yml to ensure that new installs of autobox.pm aren't shadowed by old - versions (thanks Michael G Schwern) + versions (thanks, Michael G Schwern) 0.03 Sun Aug 10 03:17:16 2003 - added support for can() and isa() - - documented print { hashref_expression() } issues/workarounds + - documented `print { hashref_expression() }` + issues/workarounds 0.02 Wed Aug 6 16:49:45 2003 @@ -322,4 +350,5 @@ 0.01 Mon Aug 4 01:00:18 2003 - - original version; created by h2xs 1.21 with options -n autobox-0.01 + - original version; created by h2xs 1.21 with + options -n autobox-0.01 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autobox-2.85/LICENSE.md new/autobox-2.86/LICENSE.md --- old/autobox-2.85/LICENSE.md 1970-01-01 01:00:00.000000000 +0100 +++ new/autobox-2.86/LICENSE.md 2018-03-29 22:42:20.000000000 +0200 @@ -0,0 +1,192 @@ +The Artistic License 2.0 +======================== + +_Copyright © 2000-2006, The Perl Foundation._ + +Everyone is permitted to copy and distribute verbatim copies +of this license document, but changing it is not allowed. + +### Preamble + +This license establishes the terms under which a given free software +Package may be copied, modified, distributed, and/or redistributed. +The intent is that the Copyright Holder maintains some artistic +control over the development of that Package while still keeping the +Package available as open source and free software. + +You are always permitted to make arrangements wholly outside of this +license directly with the Copyright Holder of a given Package. If the +terms of this license do not permit the full use that you propose to +make of the Package, you should contact the Copyright Holder and seek +a different licensing arrangement. + +### Definitions + +“Copyright Holder” means the individual(s) or organization(s) +named in the copyright notice for the entire Package. + +“Contributor” means any party that has contributed code or other +material to the Package, in accordance with the Copyright Holder's +procedures. + +“You” and “your” means any person who would like to copy, +distribute, or modify the Package. + +“Package” means the collection of files distributed by the +Copyright Holder, and derivatives of that collection and/or of +those files. A given Package may consist of either the Standard +Version, or a Modified Version. + +“Distribute” means providing a copy of the Package or making it +accessible to anyone else, or in the case of a company or +organization, to others outside of your company or organization. + +“Distributor Fee” means any fee that you charge for Distributing +this Package or providing support for this Package to another +party. It does not mean licensing fees. + +“Standard Version” refers to the Package if it has not been +modified, or has been modified only in ways explicitly requested +by the Copyright Holder. + +“Modified Version” means the Package, if it has been changed, and +such changes were not explicitly requested by the Copyright +Holder. + +“Original License” means this Artistic License as Distributed with +the Standard Version of the Package, in its current version or as +it may be modified by The Perl Foundation in the future. + +“Source” form means the source code, documentation source, and +configuration files for the Package. + +“Compiled” form means the compiled bytecode, object code, binary, +or any other form resulting from mechanical transformation or +translation of the Source form. + +### Permission for Use and Modification Without Distribution + +**(1)** You are permitted to use the Standard Version and create and use +Modified Versions for any purpose without restriction, provided that +you do not Distribute the Modified Version. + +### Permissions for Redistribution of the Standard Version + +**(2)** You may Distribute verbatim copies of the Source form of the +Standard Version of this Package in any medium without restriction, +either gratis or for a Distributor Fee, provided that you duplicate +all of the original copyright notices and associated disclaimers. At +your discretion, such verbatim copies may or may not include a +Compiled form of the Package. + +**(3)** You may apply any bug fixes, portability changes, and other +modifications made available from the Copyright Holder. The resulting +Package will still be considered the Standard Version, and as such +will be subject to the Original License. + +### Distribution of Modified Versions of the Package as Source + +**(4)** You may Distribute your Modified Version as Source (either gratis +or for a Distributor Fee, and with or without a Compiled form of the +Modified Version) provided that you clearly document how it differs +from the Standard Version, including, but not limited to, documenting +any non-standard features, executables, or modules, and provided that +you do at least ONE of the following: + +* **(a)** make the Modified Version available to the Copyright Holder +of the Standard Version, under the Original License, so that the +Copyright Holder may include your modifications in the Standard +Version. +* **(b)** ensure that installation of your Modified Version does not +prevent the user installing or running the Standard Version. In +addition, the Modified Version must bear a name that is different +from the name of the Standard Version. +* **(c)** allow anyone who receives a copy of the Modified Version to +make the Source form of the Modified Version available to others +under + * **(i)** the Original License or + * **(ii)** a license that permits the licensee to freely copy, + modify and redistribute the Modified Version using the same + licensing terms that apply to the copy that the licensee + received, and requires that the Source form of the Modified + Version, and of any works derived from it, be made freely + available in that license fees are prohibited but Distributor + Fees are allowed. + +### Distribution of Compiled Forms of the Standard Version +### or Modified Versions without the Source + +**(5)** You may Distribute Compiled forms of the Standard Version without +the Source, provided that you include complete instructions on how to +get the Source of the Standard Version. Such instructions must be +valid at the time of your distribution. If these instructions, at any +time while you are carrying out such distribution, become invalid, you +must provide new instructions on demand or cease further distribution. +If you provide valid instructions or cease distribution within thirty +days after you become aware that the instructions are invalid, then +you do not forfeit any of your rights under this license. + +**(6)** You may Distribute a Modified Version in Compiled form without +the Source, provided that you comply with Section 4 with respect to +the Source of the Modified Version. + +### Aggregating or Linking the Package + +**(7)** You may aggregate the Package (either the Standard Version or +Modified Version) with other packages and Distribute the resulting +aggregation provided that you do not charge a licensing fee for the +Package. Distributor Fees are permitted, and licensing fees for other +components in the aggregation are permitted. The terms of this license +apply to the use and Distribution of the Standard or Modified Versions +as included in the aggregation. + +**(8)** You are permitted to link Modified and Standard Versions with +other works, to embed the Package in a larger work of your own, or to +build stand-alone binary or bytecode versions of applications that +include the Package, and Distribute the result without restriction, +provided the result does not expose a direct interface to the Package. + +### Items That are Not Considered Part of a Modified Version + +**(9)** Works (including, but not limited to, modules and scripts) that +merely extend or make use of the Package, do not, by themselves, cause +the Package to be a Modified Version. In addition, such works are not +considered parts of the Package itself, and are not subject to the +terms of this license. + +### General Provisions + +**(10)** Any use, modification, and distribution of the Standard or +Modified Versions is governed by this Artistic License. By using, +modifying or distributing the Package, you accept this license. Do not +use, modify, or distribute the Package, if you do not accept this +license. + +**(11)** If your Modified Version has been derived from a Modified +Version made by someone other than you, you are nevertheless required +to ensure that your Modified Version complies with the requirements of +this license. + +**(12)** This license does not grant you the right to use any trademark, +service mark, tradename, or logo of the Copyright Holder. + +**(13)** This license includes the non-exclusive, worldwide, +free-of-charge patent license to make, have made, use, offer to sell, +sell, import and otherwise transfer the Package with respect to any +patent claims licensable by the Copyright Holder that are necessarily +infringed by the Package. If you institute patent litigation +(including a cross-claim or counterclaim) against any party alleging +that the Package constitutes direct or contributory patent +infringement, then this Artistic License to you shall terminate on the +date that such litigation is filed. + +**(14)** **Disclaimer of Warranty:** + +THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS +IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR +NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL +LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF +ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autobox-2.85/MANIFEST new/autobox-2.86/MANIFEST --- old/autobox-2.85/MANIFEST 2017-02-27 20:25:38.000000000 +0100 +++ new/autobox-2.86/MANIFEST 2018-04-20 21:44:04.000000000 +0200 @@ -3,8 +3,10 @@ lib/autobox.pm lib/autobox.pod lib/autobox/universal.pm +LICENSE.md Makefile.PL MANIFEST This list of files +META.json META.yml ppport.h ptable.h @@ -12,6 +14,8 @@ t/all.t t/autoref.t t/coderef.t +t/debugger.pl +t/debugger.t t/default.t t/export.t t/hints.t @@ -22,6 +26,7 @@ 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 @@ -31,4 +36,3 @@ t/universal_type.t t/unmerge.t t/version.t -META.json Module JSON meta-data (added by MakeMaker) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autobox-2.85/META.json new/autobox-2.86/META.json --- old/autobox-2.85/META.json 2017-02-27 20:25:38.000000000 +0100 +++ new/autobox-2.86/META.json 2018-04-20 22:24:25.000000000 +0200 @@ -4,9 +4,9 @@ "chocolateboy <chocol...@cpan.org>" ], "dynamic_config" : 1, - "generated_by" : "ExtUtils::MakeMaker version 7.18, CPAN::Meta::Converter version 2.143240", + "generated_by" : "ExtUtils::MakeMaker version 7.24, CPAN::Meta::Converter version 2.150010", "license" : [ - "perl_5" + "artistic_2" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", @@ -22,7 +22,7 @@ "prereqs" : { "build" : { "requires" : { - "ExtUtils::MakeMaker" : "0" + "IPC::System::Simple" : "1.25" } }, "configure" : { @@ -46,5 +46,6 @@ "url" : "https://github.com/chocolateboy/autobox" } }, - "version" : "2.85" + "version" : "2.86", + "x_serialization_backend" : "JSON::PP version 2.27400_02" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autobox-2.85/META.yml new/autobox-2.86/META.yml --- old/autobox-2.85/META.yml 2017-02-27 20:25:38.000000000 +0100 +++ new/autobox-2.86/META.yml 2018-04-20 22:24:25.000000000 +0200 @@ -3,12 +3,12 @@ author: - 'chocolateboy <chocol...@cpan.org>' build_requires: - ExtUtils::MakeMaker: '0' + IPC::System::Simple: '1.25' configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 1 -generated_by: 'ExtUtils::MakeMaker version 7.18, CPAN::Meta::Converter version 2.143240' -license: perl +generated_by: 'ExtUtils::MakeMaker version 7.24, CPAN::Meta::Converter version 2.150010' +license: artistic_2 meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' @@ -23,4 +23,5 @@ resources: bugtracker: https://github.com/chocolateboy/autobox/issues repository: https://github.com/chocolateboy/autobox -version: '2.85' +version: '2.86' +x_serialization_backend: 'CPAN::Meta::YAML version 0.018' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autobox-2.85/Makefile.PL new/autobox-2.86/Makefile.PL --- old/autobox-2.85/Makefile.PL 2016-08-26 21:50:25.000000000 +0200 +++ new/autobox-2.86/Makefile.PL 2018-04-20 16:17:05.000000000 +0200 @@ -18,27 +18,33 @@ $OPTIMIZE = $Config{optimize}; } +my $META_MERGE = { + resources => { + repository => 'https://github.com/chocolateboy/autobox', + bugtracker => 'https://github.com/chocolateboy/autobox/issues', + }, +}; + +my $TEST_REQUIRES = { + 'IPC::System::Simple' => '1.25', +}; + WriteMakefile( - NAME => 'autobox', - VERSION_FROM => 'lib/autobox.pm', + NAME => 'autobox', + VERSION_FROM => 'lib/autobox.pm', + # compatibility in case module was previously installed to lib - INSTALLDIRS => ($] >= 5.011 ? 'site' : 'perl'), - PREREQ_PM => { - 'Scope::Guard' => '0.21', + INSTALLDIRS => ($] >= 5.011 ? 'site' : 'perl'), + + PREREQ_PM => { + 'Scope::Guard' => '0.21', }, - ABSTRACT_FROM => 'lib/autobox.pod', - AUTHOR => 'chocolateboy <chocol...@cpan.org>', - INC => '-I.', - OPTIMIZE => $OPTIMIZE, - ($EUMM_VERSION >= 6.48 ? (MIN_PERL_VERSION => '5.8.0') : ()), - ($EUMM_VERSION >= 6.31 ? (LICENSE => 'perl') : ()), - ($EUMM_VERSION >= 6.46 ? - (META_MERGE => { - resources => { - repository => 'https://github.com/chocolateboy/autobox', - bugtracker => 'https://github.com/chocolateboy/autobox/issues', - }, - }) - : () - ), + ABSTRACT_FROM => 'lib/autobox.pod', + AUTHOR => 'chocolateboy <chocol...@cpan.org>', + INC => '-I.', + OPTIMIZE => $OPTIMIZE, + ($EUMM_VERSION >= 6.5503 ? (BUILD_REQUIRES => $TEST_REQUIRES) : ()), + ($EUMM_VERSION >= 6.31 ? (LICENSE => 'artistic_2') : ()), + ($EUMM_VERSION >= 6.46 ? (META_MERGE => $META_MERGE) : ()), + ($EUMM_VERSION >= 6.48 ? (MIN_PERL_VERSION => '5.8.0') : ()), ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autobox-2.85/README new/autobox-2.86/README --- old/autobox-2.85/README 2017-02-27 19:20:31.000000000 +0100 +++ new/autobox-2.86/README 2018-04-20 21:07:11.000000000 +0200 @@ -1,4 +1,4 @@ -autobox version 2.85 +autobox version 2.86 ==================== 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. @@ -26,6 +26,7 @@ COPYRIGHT AND LICENCE -This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. +Copyright (c) 2003-2018 by chocolateboy. -Copyright (c) 2003-2017 chocolateboy <chocol...@cpan.org> +This is free software; you can redistribute it and/or modify it under the +terms of the Artistic License 2.0. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autobox-2.85/autobox.xs new/autobox-2.86/autobox.xs --- old/autobox-2.85/autobox.xs 2016-08-26 21:35:32.000000000 +0200 +++ new/autobox-2.86/autobox.xs 2018-04-20 17:33:29.000000000 +0200 @@ -10,117 +10,181 @@ static PTABLE_t *AUTOBOX_OP_MAP = NULL; static U32 AUTOBOX_SCOPE_DEPTH = 0; -static OP *(*autobox_old_ck_subr)(pTHX_ OP *op) = NULL; +static OP *(*autobox_old_check_entersub)(pTHX_ OP *op) = NULL; -static SV * autobox_method_common(pTHX_ SV *meth, U32 *hashp); +static SV * autobox_method_common(pTHX_ SV *method, U32 *hashp); static const char * autobox_type(pTHX_ SV * const sv, STRLEN *len); static void autobox_cleanup(pTHX_ void * unused); -OP * autobox_ck_subr(pTHX_ OP *o); +OP * autobox_check_entersub(pTHX_ OP *o); OP * autobox_method_named(pTHX); OP * autobox_method(pTHX); -OP * autobox_ck_subr(pTHX_ OP *o) { +void auto_ref(pTHX_ OP *invocant, UNOP *parent, OP *prev); + +/* handle non-reference invocants e.g. @foo->bar, %foo->bar etc. */ +void auto_ref(pTHX_ OP *invocant, UNOP *parent, OP *prev) { /* - * work around a %^H scoping bug by checking that PL_hints (which is properly scoped) & an unused - * PL_hints bit (0x100000) is true + * perlref: + * + * As a special case, "\(@foo)" returns a list of references to the + * contents of @foo, not a reference to @foo itself. Likewise for %foo, + * except that the key references are to copies (since the keys are just + * strings rather than full-fledged scalars). + * + * we don't want that (it results in the invocant being a reference to the + * last element in the list), so we toggle the parentheses off while creating + * the reference then toggle them back on in case they're needed elsewhere * - * XXX this is fixed in #33311: http://www.nntp.perl.org/group/perl.perl5.porters/2008/02/msg134131.html */ - if ((PL_hints & 0x80020000) == 0x80020000) { - UNOP *parent = (OpHAS_SIBLING(cUNOPo->op_first)) ? cUNOPo : ((UNOP*)cUNOPo->op_first); - OP *prev = parent->op_first; - OP *o2 = OpSIBLING(prev); - OP *cvop; - - for (cvop = o2; OpHAS_SIBLING(cvop); cvop = OpSIBLING(cvop)); - - /* don't autobox if the receiver is a bareword */ - if ((cvop->op_type == OP_METHOD) || ((cvop->op_type == OP_METHOD_NAMED) && !(o2->op_private & OPpCONST_BARE))) { - const char * meth; - /* - * the bareword flag is not set on the receivers of the import, unimport - * and VERSION messages faked up by use() and no(), so exempt them - */ - if ((cvop->op_type == OP_METHOD) || - (((meth = SvPVX_const(((SVOP *)cvop)->op_sv))) && /* SvPVX_const should be sane for method_named */ - strNE(meth, "import") && strNE(meth, "unimport") && strNE(meth, "VERSION"))) { - HV *table = GvHV(PL_hintgv); - SV **svp; - - /* if there are bindings for this scope */ - if (table && (svp = hv_fetch(table, "autobox", 7, FALSE)) && *svp && SvOK(*svp)) { - /* - * if the receiver is an @array, %hash, @{ ... } or %{ ... }, then "autoref" it - * i.e. the op tree equivalent of inserting a backslash before it - */ - -#ifndef op_sibling_splice - OP *refgen; -#endif - U32 toggled = 0; + bool toggled = FALSE; - switch (o2->op_type) { - case OP_PADAV: - case OP_PADHV: - case OP_RV2AV: - case OP_RV2HV: - /* - * perlref: - * - * As a special case, "\(@foo)" returns a list of references to the contents of @foo, - * not a reference to @foo itself. Likewise for %foo, except that the key references - * are to copies (since the keys are just strings rather than full-fledged scalars). - * - * we don't want that (it results in the receiver being a reference to the last element - * in the list), so we toggle the parentheses off while creating the reference - * then toggle them back on in case they're needed elsewhere - * - */ - if (o2->op_flags & OPf_PARENS) { - o2->op_flags &= ~OPf_PARENS; - toggled = 1; - } + if (invocant->op_flags & OPf_PARENS) { + invocant->op_flags &= ~OPf_PARENS; + toggled = TRUE; + } #ifdef op_sibling_splice - op_sibling_splice( - (OP *)parent, - prev, - 0, - newUNOP( - OP_REFGEN, - 0, - op_sibling_splice( - (OP *)parent, - prev, - 1, - NULL - ) - ) - ); + op_sibling_splice( + (OP *)parent, + prev, + 0, + newUNOP( + OP_REFGEN, + 0, + op_sibling_splice( + (OP *)parent, + prev, + 1, + NULL + ) + ) + ); #else - refgen = newUNOP(OP_REFGEN, 0, o2); - prev->op_sibling = refgen; - refgen->op_sibling = o2->op_sibling; - o2->op_sibling = NULL; + /* XXX if this (old?) way works, why do we need both? */ + OP *refgen = newUNOP(OP_REFGEN, 0, invocant); + prev->op_sibling = refgen; + refgen->op_sibling = invocant->op_sibling; + invocant->op_sibling = NULL; #endif - /* Restore the parentheses in case something else expects them */ - if (toggled) { - o2->op_flags |= OPf_PARENS; - } - /* otherwise do nothing */ - } + /* Restore the parentheses in case something else expects them */ + if (toggled) { + invocant->op_flags |= OPf_PARENS; + } +} - cvop->op_flags |= OPf_SPECIAL; - cvop->op_ppaddr = cvop->op_type == OP_METHOD ? autobox_method : autobox_method_named; - PTABLE_store(AUTOBOX_OP_MAP, cvop, SvRV(*svp)); - } - } +OP * autobox_check_entersub(pTHX_ OP *o) { + UNOP *parent; + OP *prev, *invocant, *cvop; + SV **svp; + HV *hh; + bool has_bindings = FALSE; + + /* + * XXX note: perl adopts a convention of calling the OP `o` and has shortcut + * macros based on this convention like cUNOPo, among others. if the name + * changes, the macro will need to change as well e.g. to cUNOPx(op) + */ + + /* + * work around a %^H scoping bug by checking that PL_hints (which is + * properly scoped) & an unused PL_hints bit (0x100000) is true + * + * XXX this is fixed in #33311: + * + * http://www.nntp.perl.org/group/perl.perl5.porters/2008/02/msg134131.html + */ + if ((PL_hints & 0x80020000) != 0x80020000) { + goto done; + } + + /* + * the OP which yields the CV is the last OP in the ENTERSUB OP's list of + * children. navigate to it by following the `op_sibling` pointers from the + * first child in the list (the invocant) + */ + + parent = OpHAS_SIBLING(cUNOPo->op_first) ? cUNOPo : ((UNOP *)cUNOPo->op_first); + prev = parent->op_first; + invocant = OpSIBLING(prev); + + for (cvop = invocant; OpHAS_SIBLING(cvop); cvop = OpSIBLING(cvop)); + + /* + * now we have the CV OP, we can check if it's a method lookup. + * bail out if it's not + */ + if ((cvop->op_type != OP_METHOD) && (cvop->op_type != OP_METHOD_NAMED)) { + goto done; + } + + /* bail out if the invocant is a bareword e.g. Foo->bar */ + if ((invocant->op_type == OP_CONST) && (invocant->op_private & OPpCONST_BARE)) { + goto done; + } + + /* + * the bareword flag is not set on the invocants of the `import`, `unimport` + * and `VERSION` methods faked up by `use` and `no` [1]. we have no other way + * to detect if an OP_CONST invocant is a bareword for these methods, + * so we have no choice but to assume it is and bail out so that we don't + * break `use`, `no` etc. + * + * (this is documented: the solution/workaround is to use + * $value->autobox_class instead.) + * + * [1] XXX this is a bug (in perl) + */ + if (cvop->op_type == OP_METHOD_NAMED) { + /* SvPVX_const should be sane for the method name */ + const char * method_name = SvPVX_const(((SVOP *)cvop)->op_sv); + + if ( + strEQ(method_name, "import") || + strEQ(method_name, "unimport") || + strEQ(method_name, "VERSION") + ) { + goto done; } } - return autobox_old_ck_subr(aTHX_ o); + hh = GvHV(PL_hintgv); /* the hints hash (%^H) */ + + /* is there a bindings hashref for this scope? */ + has_bindings = hh + && (svp = hv_fetch(hh, "autobox", 7, FALSE)) + && *svp + && SvROK(*svp); + + if (!has_bindings) { + goto done; + } + + /* + * if the invocant is an @array, %hash, @{ ... } or %{ ... }, then + * "auto-ref" it i.e. the optree equivalent of inserting a backslash + * before it: + * + * @foo->bar -> (\@foo)->bar + */ + switch (invocant->op_type) { + case OP_PADAV: + case OP_PADHV: + case OP_RV2AV: + case OP_RV2HV: + auto_ref(aTHX_ invocant, parent, prev); + } + + cvop->op_flags |= OPf_SPECIAL; + cvop->op_ppaddr = cvop->op_type == OP_METHOD + ? autobox_method + : autobox_method_named; + + PTABLE_store(AUTOBOX_OP_MAP, cvop, SvRV(*svp)); + + done: + return autobox_old_check_entersub(aTHX_ o); } OP* autobox_method(pTHX) { @@ -130,6 +194,7 @@ if (SvROK(sv)) { cv = SvRV(sv); + if (SvTYPE(cv) == SVt_PVCV) { SETs(cv); RETURN; @@ -162,7 +227,9 @@ } } -#define AUTOBOX_TYPE_RETURN(type) STMT_START { *len = (sizeof(type) - 1); return type; } STMT_END +#define AUTOBOX_TYPE_RETURN(type) STMT_START { \ + *len = (sizeof(type) - 1); return type; \ +} STMT_END static const char *autobox_type(pTHX_ SV * const sv, STRLEN *len) { switch (SvTYPE(sv)) { @@ -183,7 +250,10 @@ AUTOBOX_TYPE_RETURN("FLOAT"); } case SVt_PVNV: - /* integer before float: https://rt.cpan.org/Ticket/Display.html?id=46814 */ + /* + * integer before float: + * https://rt.cpan.org/Ticket/Display.html?id=46814 + */ if (SvIOK(sv)) { AUTOBOX_TYPE_RETURN("INTEGER"); } else if (SvNOK(sv)) { @@ -246,10 +316,14 @@ } /* returns either the method, or NULL, meaning delegate to the original op */ -static SV * autobox_method_common(pTHX_ SV * meth, U32* hashp) { +/* FIXME this has diverged from the implementation in pp_hot.c */ +static SV * autobox_method_common(pTHX_ SV * method, U32* hashp) { SV * const sv = *(PL_stack_base + TOPMARK + 1); - /* if autobox is enabled (in scope) for this op and the receiver isn't an object... */ + /* + * if autobox is enabled (in scope) for this op and the invocant isn't + * an object... + */ /* don't use sv_isobject - we don't want to call SvGETMAGIC twice */ if ((PL_op->op_flags & OPf_SPECIAL) && ((!SvROK(sv)) || !SvOBJECT(SvRV(sv)))) { HV * autobox_bindings; @@ -265,8 +339,8 @@ STRLEN typelen = 0; /* - * the type is either the receiver's reftype(), a subtype of SCALAR if it's - * not a ref, or UNDEF if it's not defined + * the type is either the invocant's reftype(), a subtype of + * SCALAR if it's not a ref, or UNDEF if it's not defined */ if (SvOK(sv)) { @@ -288,21 +362,35 @@ stash = gv_stashpvn(packname, packlen, FALSE); if (hashp) { - const HE* const he = hv_fetch_ent(stash, meth, 0, *hashp); /* shortcut for simple names */ + /* shortcut for simple names */ + const HE* const he = hv_fetch_ent(stash, method, 0, *hashp); if (he) { gv = (GV*)HeVAL(he); - if (isGV(gv) && GvCV(gv) && (!GvCVGEN(gv) || GvCVGEN(gv) == PL_sub_generation)) { + + /* + * FIXME this has diverged from the implementation + * in pp_hot.c + */ + if ( + isGV(gv) + && GvCV(gv) + && (!GvCVGEN(gv) || GvCVGEN(gv) == PL_sub_generation) + ) { return ((SV*)GvCV(gv)); } } } /* - * SvPV_nolen_const returns the method name as a const char *, stringifying names that - * are not strings (e.g. undef, SvIV, SvNV &c.) - see name.t + * SvPV_nolen_const returns the method name as a const char *, + * stringifying names that are not strings (e.g. undef, SvIV, + * SvNV &c.) - see name.t */ - gv = gv_fetchmethod(stash ? stash : (HV*)packsv, SvPV_nolen_const(meth)); + gv = gv_fetchmethod( + stash ? stash : (HV*)packsv, + SvPV_nolen_const(method) + ); if (gv) { return(isGV(gv) ? (SV*)GvCV(gv) : (SV*)gv); @@ -328,7 +416,10 @@ PROTOTYPES: ENABLE BOOT: -/* XXX the BOOT section extends to the next blank line, so don't add one for readability */ +/* + * 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); @@ -349,8 +440,8 @@ * usually, this will be Perl_ck_subr, though, in principle, * it could be a bespoke checker spliced in by another module. */ - autobox_old_ck_subr = PL_check[OP_ENTERSUB]; - PL_check[OP_ENTERSUB] = autobox_ck_subr; + autobox_old_check_entersub = PL_check[OP_ENTERSUB]; + PL_check[OP_ENTERSUB] = autobox_check_entersub; } void @@ -365,7 +456,7 @@ --AUTOBOX_SCOPE_DEPTH; } else { AUTOBOX_SCOPE_DEPTH = 0; - PL_check[OP_ENTERSUB] = autobox_old_ck_subr; + PL_check[OP_ENTERSUB] = autobox_old_check_entersub; } void diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autobox-2.85/lib/autobox.pm new/autobox-2.86/lib/autobox.pm --- old/autobox-2.85/lib/autobox.pm 2017-02-27 19:20:38.000000000 +0100 +++ new/autobox-2.86/lib/autobox.pm 2018-04-20 21:07:23.000000000 +0200 @@ -11,7 +11,7 @@ use Scope::Guard; use Storable; -our $VERSION = '2.85'; +our $VERSION = '2.86'; XSLoader::load 'autobox', $VERSION; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autobox-2.85/lib/autobox.pod new/autobox-2.86/lib/autobox.pod --- old/autobox-2.85/lib/autobox.pod 2017-02-27 19:21:06.000000000 +0100 +++ new/autobox-2.86/lib/autobox.pod 2018-04-20 22:18:25.000000000 +0200 @@ -197,11 +197,12 @@ - is equivalent to: - use autobox + use autobox { SCALAR => 'SCALAR', ARRAY => 'ARRAY', HASH => 'HASH', - CODE => 'CODE'; + CODE => 'CODE', + } This facilitates one-liners and prototypes: @@ -235,7 +236,7 @@ UNIVERSAL => ..., # any of the 3 value types above DEFAULT => ..., # any of the 3 value types above DEBUG => ... # boolean or coderef - }; + } The INTEGER, FLOAT, NUMBER, STRING, SCALAR, ARRAY, HASH, CODE, UNDEF, DEFAULT and UNIVERSAL options can take three different types of value: @@ -281,55 +282,61 @@ Thus: - use autobox + use autobox { STRING => 'MyString', - DEFAULT => 'MyDefault'; + DEFAULT => 'MyDefault', + } is equivalent to: - use autobox + use autobox { STRING => 'MyString', SCALAR => 'MyDefault', ARRAY => 'MyDefault', HASH => 'MyDefault', - CODE => 'MyDefault'; + CODE => 'MyDefault', + } Which in turn is equivalent to: - use autobox + use autobox { INTEGER => 'MyDefault', FLOAT => 'MyDefault', STRING => [ 'MyString', 'MyDefault' ], ARRAY => 'MyDefault', HASH => 'MyDefault', - CODE => 'MyDefault'; + CODE => 'MyDefault', + } Namespaces in DEFAULT values have the default type name appended, which, in the case of defaulted SCALAR types, is SCALAR rather than INTEGER, FLOAT &c. Thus: - use autobox + use autobox { ARRAY => 'MyArray', HASH => 'MyHash', CODE => 'MyCode', - DEFAULT => 'MyNamespace::'; + DEFAULT => 'MyNamespace::', + } is equivalent to: - use autobox + use autobox { INTEGER => 'MyNamespace::SCALAR', FLOAT => 'MyNamespace::SCALAR', STRING => 'MyNamespace::SCALAR', ARRAY => 'MyArray', HASH => 'MyArray', - CODE => 'MyCode'; + CODE => 'MyCode', + } Any of the four default types can be exempted from defaulting to the DEFAULT value by supplying a value of undef: - use autobox + use autobox { HASH => undef, - DEFAULT => 'MyDefault'; + DEFAULT => 'MyDefault', + } 42->foo # ok: MyDefault::foo []->bar # ok: MyDefault::bar @@ -387,9 +394,10 @@ is equivalent to: - use autobox + use autobox { INTEGER => 'MyNumber', - FLOAT => 'MyNumber'; + FLOAT => 'MyNumber', + } And: @@ -397,10 +405,11 @@ is equivalent to: - use autobox + use autobox { INTEGER => 'MyScalar', FLOAT => 'MyScalar', - STRING => 'MyScalar'; + STRING => 'MyScalar', + } Virtual types can also be passed to C<unimport> via the C<no autobox> syntax. This disables autoboxing for the corresponding subtypes e.g. @@ -414,10 +423,11 @@ Virtual type bindings can be mixed with ordinary bindings to provide fine-grained control over inheritance and delegation. For instance: - use autobox + use autobox { INTEGER => 'MyInteger', NUMBER => 'MyNumber', - SCALAR => 'MyScalar'; + SCALAR => 'MyScalar', + } would result in the following bindings: @@ -427,15 +437,17 @@ Note that DEFAULT bindings take precedence over virtual type bindings i.e. - use autobox + use autobox { UNIVERSAL => 'MyUniversal', - DEFAULT => 'MyDefault'; # default SCALAR, ARRAY, HASH and CODE before UNIVERSAL + DEFAULT => 'MyDefault', # default SCALAR, ARRAY, HASH and CODE before UNIVERSAL + } is equivalent to: - use autobox + use autobox { INTEGER => [ 'MyDefault', 'MyUniversal' ], FLOAT => [ 'MyDefault', 'MyUniversal' ], # ... &c. + } =head2 DEBUG @@ -659,9 +671,16 @@ eval { 42->foo() }; # OK +=head3 Operator Overloading + +Operator overloading via the L<overload> pragma doesn't (automatically) work. +C<autobox> works by lexically overriding the L<arrow operator|perlop/"The Arrow Operator">. +It doesn't bless native types into objects, so overloading - or any other kind of "magic" +which depends on values being blessed - doesn't apply. + =head1 VERSION -2.85 +2.86 =head1 SEE ALSO @@ -681,11 +700,11 @@ chocolateboy <chocol...@cpan.org> -=head1 COPYRIGHT +=head1 COPYRIGHT AND LICENSE -Copyright (c) 2003-2017, chocolateboy. +Copyright (c) 2003-2018 by chocolateboy. -This module is free software. It may be used, redistributed -and/or modified under the same terms as Perl itself. +This library is free software; you can redistribute it and/or modify it under the +terms of the L<Artistic License 2.0|http://www.opensource.org/licenses/artistic-license-2.0.php>. =cut diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autobox-2.85/t/all.t new/autobox-2.86/t/all.t --- old/autobox-2.85/t/all.t 2017-02-27 19:16:59.000000000 +0100 +++ new/autobox-2.86/t/all.t 2018-04-20 16:40:54.000000000 +0200 @@ -60,12 +60,10 @@ use strict; use warnings; -use blib; - use FindBin qw($Bin); use lib "$Bin/lib"; -use Test::More tests => 292; +use Test::More tests => 302; $| = 1; @@ -78,6 +76,7 @@ my $array = [ 0 .. 9 ]; my $hash = { 0 .. 9 }; my $code = \&add; +my $test = 'test'; my $error = qr{Can't (call|locate object) method "test" (without a|via) package\b}; my $string_error = qr{Can't locate object method "test" via package "Hello, world!"}; my $unblessed_error = qr{Can't call method "test" on unblessed reference}; @@ -89,6 +88,7 @@ my $object = Test->new(); is(ref $object, 'Test', 'no args: Test->new() - bareword not autoboxed'); + is(Test->$test, 'rubicund', 'no args: Test->$test() - bareword not autoboxed'); my $result = $object->test(); is($result, 'rubicund', 'no args: $object->test() - object not autoboxed'); @@ -124,6 +124,7 @@ my $object = Test->new(); is(ref $object, 'Test', 'override package: Test->new() - bareword not autoboxed'); + is(Test->$test, 'rubicund', 'override package: Test->$test() - bareword not autoboxed'); my $result = $object->test(); is($result, 'rubicund', 'override package: $object->test() - object not autoboxed'); @@ -149,6 +150,7 @@ my $object = Test->new(); is(ref $object, 'Test', 'override namespace: Test->new() - bareword not autoboxed'); + is(Test->$test, 'rubicund', 'override namespace: Test->$test() - bareword not autoboxed'); my $result = $object->test(); is($result, 'rubicund', 'override namespace: $object->test() - object not autoboxed'); @@ -174,6 +176,7 @@ my $object = Test->new(); is(ref $object, 'Test', 'default package: Test->new() - bareword not autoboxed'); + is(Test->$test, 'rubicund', 'default package: Test->$test() - bareword not autoboxed'); my $result = $object->test(); is($result, 'rubicund', 'default package: $object->test() - object not autoboxed'); @@ -209,6 +212,7 @@ my $object = Test->new(); is(ref $object, 'Test', 'default namespace: Test->new() - bareword not autoboxed'); + is(Test->$test, 'rubicund', 'default namespace: Test->$test() - bareword not autoboxed'); my $result = $object->test(); is($result, 'rubicund', 'default namespace: $object->test() - object not autoboxed'); @@ -270,6 +274,7 @@ my $object = Test->new(); is(ref $object, 'Test', 'test all 1: Test->new() - bareword not autoboxed'); + is(Test->$test, 'rubicund', 'test all 1: Test->$test() - bareword not autoboxed'); my $result = $object->test(); is($result, 'rubicund', 'test all 1: $object->test() - object not autoboxed'); @@ -305,6 +310,7 @@ my $object = Test->new(); is(ref $object, 'Test', 'test all 2: Test->new() - bareword not autoboxed'); + is(Test->$test, 'rubicund', 'test all 2: Test->$test() - bareword not autoboxed'); my $result = $object->test(); is($result, 'rubicund', 'test all 2: $object->test() - object not autoboxed'); @@ -340,6 +346,7 @@ my $object = Test->new(); is(ref $object, 'Test', 'test all 3: Test->new() - bareword not autoboxed'); + is(Test->$test, 'rubicund', 'test all 3: Test->$test() - bareword not autoboxed'); my $result = $object->test(); is($result, 'rubicund', 'test all 3: $object->test() - object not autoboxed'); @@ -374,6 +381,7 @@ my $object = Test->new(); is(ref $object, 'Test', 'test all 4: Test->new() - bareword not autoboxed'); + is(Test->$test, 'rubicund', 'test all 4: Test->$test() - bareword not autoboxed'); my $result = $object->test(); is($result, 'rubicund', 'test all 4: $object->test() - object not autoboxed'); @@ -457,6 +465,7 @@ my $object = Test->new(); is(ref $object, 'Test', 'nested (outer): Test->new() - bareword not autoboxed'); + is(Test->$test, 'rubicund', 'nested (outer): Test->$test() - bareword not autoboxed'); my $result = $object->test(); is($result, 'rubicund', 'nested (outer): $object->test() - object not autoboxed'); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autobox-2.85/t/debugger.pl new/autobox-2.86/t/debugger.pl --- old/autobox-2.85/t/debugger.pl 1970-01-01 01:00:00.000000000 +0100 +++ new/autobox-2.86/t/debugger.pl 2018-04-20 16:17:05.000000000 +0200 @@ -0,0 +1,30 @@ +#!/usr/bin/env perl + +use strict; +use warnings; +use blib; + +use autobox { DEFAULT => __PACKAGE__ }; + +# helper for t/debugger.t +# +# this prints "foo -> bar -> baz -> quux" +# on perl < 5.22 and fails with the following error on newer perls: +# +# Can't locate object method "baz" via package "foo -> bar" +# +# https://github.com/scrottie/autobox-Core/issues/34 + +sub bar { + return "$_[0] -> bar"; +} + +sub baz { + return "$_[0] -> baz"; +} + +sub quux { + print "$_[0] -> quux", $/; +} + +'foo'->bar->baz->quux; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autobox-2.85/t/debugger.t new/autobox-2.86/t/debugger.t --- old/autobox-2.85/t/debugger.t 1970-01-01 01:00:00.000000000 +0100 +++ new/autobox-2.86/t/debugger.t 2018-04-20 16:17:05.000000000 +0200 @@ -0,0 +1,15 @@ +#!/usr/bin/env perl + +use strict; +use warnings; + +use FindBin qw($Bin); +use IPC::System::Simple qw(capturex); +use Test::More tests => 1; + +# https://github.com/scrottie/autobox-Core/issues/34 + +$ENV{PERLDB_OPTS} = 'NonStop=1'; + +chomp(my $got = capturex($^X, '-d', "$Bin/debugger.pl")); +is $got, 'foo -> bar -> baz -> quux', 'runs under perl -d'; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autobox-2.85/t/pod.t new/autobox-2.86/t/pod.t --- old/autobox-2.85/t/pod.t 1970-01-01 01:00:00.000000000 +0100 +++ new/autobox-2.86/t/pod.t 2015-03-30 18:32:05.000000000 +0200 @@ -0,0 +1,10 @@ +#!/usr/bin/env perl + +use strict; +use warnings; + +use Test::More; + +eval 'use Test::Pod 1.00'; +plan skip_all => 'Test::Pod 1.00 required for testing POD' if ($@); +all_pod_files_ok(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autobox-2.85/t/rt_71777.t new/autobox-2.86/t/rt_71777.t --- old/autobox-2.85/t/rt_71777.t 2015-03-30 18:32:05.000000000 +0200 +++ new/autobox-2.86/t/rt_71777.t 2017-02-27 23:15:41.000000000 +0100 @@ -2,7 +2,6 @@ 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