Hello community, here is the log from the commit of package perl-JSON-MaybeXS for openSUSE:Factory checked in at 2016-11-24 21:20:35 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-JSON-MaybeXS (Old) and /work/SRC/openSUSE:Factory/.perl-JSON-MaybeXS.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-JSON-MaybeXS" Changes: -------- --- /work/SRC/openSUSE:Factory/perl-JSON-MaybeXS/perl-JSON-MaybeXS.changes 2015-04-15 16:25:12.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.perl-JSON-MaybeXS.new/perl-JSON-MaybeXS.changes 2016-11-24 21:20:36.000000000 +0100 @@ -1,0 +2,34 @@ +Tue Oct 4 05:40:59 UTC 2016 - co...@suse.com + +- updated to 1.003008 + see /usr/share/doc/packages/perl-JSON-MaybeXS/Changes + + 1.003008 - 2016-10-03 + - added an INSTALLATION section to documentation, to clarify the use of + dynamic prerequisites in Makefile.PL + - minimize prereqs listed in META.json to avoid giving the appearance of XS + prerequisites, and confusing static inspection tools such as metacpan.org. + +------------------------------------------------------------------- +Tue Sep 13 05:33:02 UTC 2016 - co...@suse.com + +- updated to 1.003007 + see /usr/share/doc/packages/perl-JSON-MaybeXS/Changes + +------------------------------------------------------------------- +Mon Sep 12 05:34:10 UTC 2016 - co...@suse.com + +- updated to 1.003007 + see /usr/share/doc/packages/perl-JSON-MaybeXS/Changes + + 1.003007 - 2016-09-11 + - no changes since 1.003006_001 + + 1.003006_001 - 2016-06-28 + - bump prereq on JSON::PP, to ensure we get the fix for parsing utf8-encoded + values + - we now always upgrade JSON::XS if it is installed and below version 3.0, + due to changes in handling booleans + - remove test dependency on Test::Without::Module (RT#115394) + +------------------------------------------------------------------- Old: ---- JSON-MaybeXS-1.003005.tar.gz New: ---- JSON-MaybeXS-1.003008.tar.gz cpanspec.yml ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-JSON-MaybeXS.spec ++++++ --- /var/tmp/diff_new_pack.UBDTVc/_old 2016-11-24 21:20:37.000000000 +0100 +++ /var/tmp/diff_new_pack.UBDTVc/_new 2016-11-24 21:20:37.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package perl-JSON-MaybeXS # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 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,38 +17,39 @@ Name: perl-JSON-MaybeXS -Version: 1.003005 +Version: 1.003008 Release: 0 %define cpan_name JSON-MaybeXS Summary: Use L<Cpanel::JSON::XS> with a fallback to L<JSON::XS> and L<JSON::PP> License: Artistic-1.0 or GPL-1.0+ Group: Development/Libraries/Perl Url: http://search.cpan.org/dist/JSON-MaybeXS/ -Source: http://www.cpan.org/authors/id/E/ET/ETHER/%{cpan_name}-%{version}.tar.gz +Source0: http://www.cpan.org/authors/id/E/ET/ETHER/%{cpan_name}-%{version}.tar.gz +Source1: cpanspec.yml BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl BuildRequires: perl-macros +BuildRequires: perl(Cpanel::JSON::XS) >= 2.3310 BuildRequires: perl(ExtUtils::CBuilder) >= 0.27 -BuildRequires: perl(JSON::PP) >= 2.27202 +BuildRequires: perl(JSON::PP) >= 2.27300 BuildRequires: perl(Test::More) >= 0.88 -BuildRequires: perl(Test::Without::Module) >= 0.17 -Requires: perl(JSON::PP) >= 2.27202 +Requires: perl(Cpanel::JSON::XS) >= 2.3310 +Requires: perl(JSON::PP) >= 2.27300 Recommends: perl(Cpanel::JSON::XS) >= 2.3310 %{perl_requires} %description -This module first checks to see if either the Cpanel::JSON::XS manpage or -the JSON::XS manpage is already loaded, in which case it uses that module. -Otherwise it tries to load the Cpanel::JSON::XS manpage, then the JSON::XS -manpage, then the JSON::PP manpage in order, and either uses the first -module it finds or throws an error. +This module first checks to see if either Cpanel::JSON::XS or JSON::XS is +already loaded, in which case it uses that module. Otherwise it tries to +load Cpanel::JSON::XS, then JSON::XS, then JSON::PP in order, and either +uses the first module it finds or throws an error. It then exports the 'encode_json' and 'decode_json' functions from the loaded module, along with a 'JSON' constant that returns the class name for calling 'new' on. -If you're writing fresh code rather than replacing JSON usage, you might +If you're writing fresh code rather than replacing JSON.pm usage, you might want to pass options as constructor args rather than calling mutators, so we provide our own 'new' method that supports that. ++++++ JSON-MaybeXS-1.003005.tar.gz -> JSON-MaybeXS-1.003008.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/JSON-MaybeXS-1.003005/Changes new/JSON-MaybeXS-1.003008/Changes --- old/JSON-MaybeXS-1.003005/Changes 2015-03-22 23:03:46.000000000 +0100 +++ new/JSON-MaybeXS-1.003008/Changes 2016-10-03 04:09:37.000000000 +0200 @@ -1,5 +1,21 @@ Revision history for JSON-MaybeXS +1.003008 - 2016-10-03 + - added an INSTALLATION section to documentation, to clarify the use of + dynamic prerequisites in Makefile.PL + - minimize prereqs listed in META.json to avoid giving the appearance of XS + prerequisites, and confusing static inspection tools such as metacpan.org. + +1.003007 - 2016-09-11 + - no changes since 1.003006_001 + +1.003006_001 - 2016-06-28 + - bump prereq on JSON::PP, to ensure we get the fix for parsing utf8-encoded + values (in JSON::PP 2.27300) + - we now always upgrade JSON::XS if it is installed and below version 3.0, + due to changes in handling booleans + - remove test dependency on Test::Without::Module (RT#115394) + 1.003005 - 2015-03-22 - fix x_contributors metadata that was killing metacpan (see https://github.com/CPAN-API/cpan-api/issues/401) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/JSON-MaybeXS-1.003005/META.json new/JSON-MaybeXS-1.003008/META.json --- old/JSON-MaybeXS-1.003005/META.json 2015-03-22 23:03:56.000000000 +0100 +++ new/JSON-MaybeXS-1.003008/META.json 2016-10-03 04:09:46.000000000 +0200 @@ -4,13 +4,19 @@ "mst - Matt S. Trout (cpan:MSTROUT) <m...@shadowcat.co.uk>" ], "dynamic_config" : 1, - "generated_by" : "ExtUtils::MakeMaker version 6.98, CPAN::Meta::Converter version 2.150001", + "generated_by" : "ExtUtils::MakeMaker version 7.24, CPAN::Meta::Converter version 2.150010", + "keywords" : [ + "json", + "serializer", + "serialiser", + "data" + ], "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", - "version" : "2" + "version" : 2 }, "name" : "JSON-MaybeXS", "no_index" : { @@ -34,15 +40,14 @@ }, "requires" : { "Carp" : "0", - "JSON::PP" : "2.27202", + "JSON::PP" : "2.27300", "Scalar::Util" : "0", "perl" : "5.006" } }, "test" : { "requires" : { - "Test::More" : "0.88", - "Test::Without::Module" : "0.17" + "Test::More" : "0.88" } } }, @@ -54,11 +59,11 @@ }, "repository" : { "type" : "git", - "url" : "git://git.shadowcat.co.uk/p5sagit/JSON-MaybeXS.git", - "web" : "http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit/JSON-MaybeXS.git" + "url" : "https://github.com/p5sagit/JSON-MaybeXS.git", + "web" : "https://github.com/p5sagit/JSON-MaybeXS" } }, - "version" : "1.003005", + "version" : "1.003008", "x_contributors" : [ "Clinton Gormley <deve...@traveljury.com>", "Graham Knop <ha...@haarg.org>", @@ -66,5 +71,6 @@ "Karen Etheridge <et...@cpan.org>", "Kieren Diment <dim...@gmail.com>", "Matt S Trout <m...@shadowcat.co.uk>" - ] + ], + "x_serialization_backend" : "JSON::MaybeXS version 1.003007" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/JSON-MaybeXS-1.003005/META.yml new/JSON-MaybeXS-1.003008/META.yml --- old/JSON-MaybeXS-1.003005/META.yml 2015-03-22 23:03:56.000000000 +0100 +++ new/JSON-MaybeXS-1.003008/META.yml 2016-10-03 04:09:46.000000000 +0200 @@ -4,14 +4,18 @@ - 'mst - Matt S. Trout (cpan:MSTROUT) <m...@shadowcat.co.uk>' build_requires: Test::More: '0.88' - Test::Without::Module: '0.17' configure_requires: ExtUtils::CBuilder: '0.27' ExtUtils::MakeMaker: '0' File::Spec: '0' File::Temp: '0' dynamic_config: 1 -generated_by: 'ExtUtils::MakeMaker version 6.98, CPAN::Meta::Converter version 2.150001' +generated_by: 'ExtUtils::MakeMaker version 7.24, CPAN::Meta::Converter version 2.150010' +keywords: + - json + - serializer + - serialiser + - data license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -25,13 +29,13 @@ Cpanel::JSON::XS: '2.3310' requires: Carp: '0' - JSON::PP: '2.27202' + JSON::PP: '2.27300' Scalar::Util: '0' perl: '5.006' resources: bugtracker: https://rt.cpan.org/Public/Dist/Display.html?Name=JSON-MaybeXS - repository: git://git.shadowcat.co.uk/p5sagit/JSON-MaybeXS.git -version: '1.003005' + repository: https://github.com/p5sagit/JSON-MaybeXS.git +version: '1.003008' x_contributors: - 'Clinton Gormley <deve...@traveljury.com>' - 'Graham Knop <ha...@haarg.org>' @@ -39,3 +43,4 @@ - 'Karen Etheridge <et...@cpan.org>' - 'Kieren Diment <dim...@gmail.com>' - 'Matt S Trout <m...@shadowcat.co.uk>' +x_serialization_backend: 'CPAN::Meta::YAML version 0.018' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/JSON-MaybeXS-1.003005/Makefile.PL new/JSON-MaybeXS-1.003008/Makefile.PL --- old/JSON-MaybeXS-1.003005/Makefile.PL 2015-03-22 22:23:11.000000000 +0100 +++ new/JSON-MaybeXS-1.003008/Makefile.PL 2016-10-03 04:05:49.000000000 +0200 @@ -7,14 +7,18 @@ NAME => 'JSON::MaybeXS', VERSION_FROM => 'lib/JSON/MaybeXS.pm', - META_MERGE => { + META_ADD => { 'meta-spec' => { version => 2 }, dynamic_config => 1, resources => { - # r/w: p5sa...@git.shadowcat.co.uk:JSON-MaybeXS.git + # GitHub mirrors from Shadowcat. We list it so we can get pull requests. + # The canonical repo is: + # r/o: git://git.shadowcat.co.uk/p5sagit/JSON-MaybeXS.git + # r/w: p5sa...@git.shadowcat.co.uk:JSON-MaybeXS.git + # web: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit/JSON-MaybeXS.git repository => { - url => 'git://git.shadowcat.co.uk/p5sagit/JSON-MaybeXS.git', - web => 'http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit/JSON-MaybeXS.git', + url => 'https://github.com/p5sagit/JSON-MaybeXS.git', + web => 'https://github.com/p5sagit/JSON-MaybeXS', type => 'git', }, bugtracker => { @@ -22,7 +26,7 @@ web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=JSON-MaybeXS', }, }, - x_contributors => [ # manually added, from git shortlog -e -s + x_contributors => [ # manually added, from git shortlog -e -s -n 'Clinton Gormley <deve...@traveljury.com>', 'Graham Knop <ha...@haarg.org>', 'John SJ Anderson <geneh...@genehack.org>', @@ -30,9 +34,8 @@ 'Kieren Diment <dim...@gmail.com>', 'Matt S Trout <m...@shadowcat.co.uk>', ], - }, + keywords => [ qw(json serializer serialiser data) ], - META_ADD => { prereqs => { configure => { requires => { @@ -46,7 +49,7 @@ requires => { 'Scalar::Util' => '0', 'Carp' => '0', - 'JSON::PP' => '2.27202', + 'JSON::PP' => '2.27300', # we may also add a runtime prereq for Cpanel::JSON::XS, on the # installer's machine perl => '5.006', @@ -55,7 +58,6 @@ }, test => { requires => { - 'Test::Without::Module' => '0.17', 'Test::More' => '0.88', }, }, @@ -78,25 +80,20 @@ # dynamic prereqs get added here. -# we require Cpanel::JSON::XS, except if JSON::XS is already installed. -# (we also always recommend Cpanel::JSON::XS, just to make sure.) -$WriteMakefileArgs{PREREQ_PM}{'Cpanel::JSON::XS'} = '2.3310' - if not parse_args()->{PUREPERL_ONLY} - and ((eval { require Cpanel::JSON::XS; 1 } and not eval { Cpanel::JSON::XS->VERSION('2.3310'); 1 }) - or (not eval { require JSON::XS; 1; } and can_xs())); - -# avoid "JSON::XS::Boolean::* redefined" warnings caused by incompatibilities -# between JSON::XS 2.x and 3.0 -- -# if JSON::XS is installed and < 3.0 -# and Cpanel::JSON::JSON is (or is about to be) >= 3.0, -# then update JSON::XS to eliminate the incompatibility -$WriteMakefileArgs{PREREQ_PM}{'JSON::XS'} = '3.00' - if not parse_args()->{PUREPERL_ONLY} - and eval { require JSON::XS; 1 } and not eval { JSON::XS->VERSION('3.0'); 1 } - and (eval { require Cpanel::JSON::XS; Cpanel::JSON::XS->VERSION('3.0'); 1 } - # we presume here that if we are installing Cpanel::JSON::XS, we - # are installing the latest version - or exists $WriteMakefileArgs{PREREQ_PM}{'Cpanel::JSON::XS'}); +my $args = parse_args(); + +if (not $args->{PUREPERL_ONLY}) { + # we require Cpanel::JSON::XS, except if JSON::XS is already installed. + # (we also always recommend Cpanel::JSON::XS, just to make sure.) + $WriteMakefileArgs{PREREQ_PM}{'Cpanel::JSON::XS'} = '2.3310' + if eval { require Cpanel::JSON::XS; 1 } + or (not eval { require JSON::XS; 1; } and can_xs()); + + # JSON::XS 3 changed its boolean handling - update it + # if JSON::XS is installed and < 3.0 + $WriteMakefileArgs{PREREQ_PM}{'JSON::XS'} = '3.00' + if eval { require JSON::XS; 1 } and not eval { JSON::XS->VERSION('3.0'); 1 }; +} $WriteMakefileArgs{MIN_PERL_VERSION} = delete $WriteMakefileArgs{PREREQ_PM}{perl} || 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/JSON-MaybeXS-1.003005/README new/JSON-MaybeXS-1.003008/README --- old/JSON-MaybeXS-1.003005/README 2015-03-22 23:03:56.000000000 +0100 +++ new/JSON-MaybeXS-1.003008/README 2016-10-03 04:09:47.000000000 +0200 @@ -51,7 +51,7 @@ in ":all". NOTE: This is to support legacy code that makes extensive use of "to_json" and "from_json" which you are not yet in a position to refactor. DO NOT use this import tag in new code, in order to avoid the - crawling horrors of getting UTF8 support subtly wrong. See the + crawling horrors of getting UTF-8 support subtly wrong. See the documentation for JSON for further details. encode_json @@ -108,6 +108,9 @@ which works equivalently to the above (and in the usual tradition will accept a hashref instead of a hash, should you so desire). + The resulting object is blessed into the underlying backend, which + offers (at least) the methods "encode" and "decode". + BOOLEANS To include JSON-aware booleans ("true", "false") in your data, just do: @@ -115,6 +118,32 @@ my $true = JSON->true; my $false = JSON->false; +CONVERTING FROM JSON::Any + JSON::Any used to be the favoured compatibility layer above the various + JSON backends, but over time has grown a lot of extra code to deal with + legacy backends (e.g. JSON::Syck) that are no longer needed. This is a + rough guide of translating such code: + + Change code from: + + use JSON::Any; + my $json = JSON::Any->new->objToJson($data); # or to_json($data), or Dump($data) + + to: + + use JSON::MaybeXS; + my $json = encode_json($data); + + Change code from: + + use JSON::Any; + my $data = JSON::Any->new->jsonToObj($json); # or from_json($json), or Load($json) + + to: + + use JSON::MaybeXS; + my $json = decode_json($data); + CAVEATS The "new()" method in this module is technically a factory, not a constructor, because the objects it returns will *NOT* be blessed into @@ -135,6 +164,23 @@ use Moose::Util::TypeConstraints 'duck_type'; is 'json' => ( isa => Object , duck_type([qw/ encode decode /])); +INSTALLATION + At installation time, Makefile.PL will attempt to determine if you have + a working compiler available, and therefore whether you are able to run + XS code. If so, Cpanel::JSON::XS will be added to the prerequisite list, + unless JSON::XS is already installed at a high enough version. JSON::XS + may also be upgraded to fix any incompatibility issues. + + Because running XS code is not mandatory and JSON::PP (which is in perl + core) is used as a fallback backend, this module is safe to be used in a + suite of code that is fatpacked or installed into a restricted-resource + environment. + + You can also prevent any XS dependencies from being installed by setting + "PUREPERL_ONLY=1" in Makefile.PL options (or in the "PERL_MM_OPT" + environment variable), or using the "--pp" or "--pureperl" flags with + the cpanminus client. + AUTHOR mst - Matt S. Trout (cpan:MSTROUT) <m...@shadowcat.co.uk> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/JSON-MaybeXS-1.003005/lib/JSON/MaybeXS.pm new/JSON-MaybeXS-1.003008/lib/JSON/MaybeXS.pm --- old/JSON-MaybeXS-1.003005/lib/JSON/MaybeXS.pm 2015-03-22 23:02:07.000000000 +0100 +++ new/JSON-MaybeXS-1.003008/lib/JSON/MaybeXS.pm 2016-10-03 02:31:13.000000000 +0200 @@ -4,7 +4,7 @@ use warnings FATAL => 'all'; use base qw(Exporter); -our $VERSION = '1.003005'; +our $VERSION = '1.003008'; $VERSION = eval $VERSION; sub _choose_json_module { @@ -154,7 +154,7 @@ C<:all>. NOTE: This is to support legacy code that makes extensive use of C<to_json> and C<from_json> which you are not yet in a position to refactor. DO NOT use this import tag in new code, in order to avoid -the crawling horrors of getting UTF8 support subtly wrong. See the +the crawling horrors of getting UTF-8 support subtly wrong. See the documentation for L<JSON> for further details. =head2 encode_json @@ -215,6 +215,9 @@ which works equivalently to the above (and in the usual tradition will accept a hashref instead of a hash, should you so desire). +The resulting object is blessed into the underlying backend, which offers (at +least) the methods C<encode> and C<decode>. + =head1 BOOLEANS To include JSON-aware booleans (C<true>, C<false>) in your data, just do: @@ -223,6 +226,33 @@ my $true = JSON->true; my $false = JSON->false; +=head1 CONVERTING FROM JSON::Any + +L<JSON::Any> used to be the favoured compatibility layer above the various +JSON backends, but over time has grown a lot of extra code to deal with legacy +backends (e.g. L<JSON::Syck>) that are no longer needed. This is a rough guide of translating such code: + +Change code from: + + use JSON::Any; + my $json = JSON::Any->new->objToJson($data); # or to_json($data), or Dump($data) + +to: + + use JSON::MaybeXS; + my $json = encode_json($data); + + +Change code from: + + use JSON::Any; + my $data = JSON::Any->new->jsonToObj($json); # or from_json($json), or Load($json) + +to: + + use JSON::MaybeXS; + my $json = decode_json($data); + =head1 CAVEATS The C<new()> method in this module is technically a factory, not a @@ -244,6 +274,23 @@ use Moose::Util::TypeConstraints 'duck_type'; is 'json' => ( isa => Object , duck_type([qw/ encode decode /])); +=head1 INSTALLATION + +At installation time, F<Makefile.PL> will attempt to determine if you have a +working compiler available, and therefore whether you are able to run XS code. +If so, L<Cpanel::JSON::XS> will be added to the prerequisite list, unless +L<JSON::XS> is already installed at a high enough version. L<JSON::XS> may +also be upgraded to fix any incompatibility issues. + +Because running XS code is not mandatory and L<JSON::PP> (which is in perl +core) is used as a fallback backend, this module is safe to be used in a suite +of code that is fatpacked or installed into a restricted-resource environment. + +You can also prevent any XS dependencies from being installed by setting +C<PUREPERL_ONLY=1> in F<Makefile.PL> options (or in the C<PERL_MM_OPT> +environment variable), or using the C<--pp> or C<--pureperl> flags with the +L<cpanminus client|cpanm>. + =head1 AUTHOR mst - Matt S. Trout (cpan:MSTROUT) <m...@shadowcat.co.uk> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/JSON-MaybeXS-1.003005/t/cpanel.t new/JSON-MaybeXS-1.003008/t/cpanel.t --- old/JSON-MaybeXS-1.003005/t/cpanel.t 2015-03-08 09:07:51.000000000 +0100 +++ new/JSON-MaybeXS-1.003008/t/cpanel.t 2015-12-26 01:28:35.000000000 +0100 @@ -1,6 +1,6 @@ use strict; use warnings; -use Test::More; +use Test::More 0.88; use JSON::MaybeXS; unless ( eval { require Cpanel::JSON::XS; 1 } ) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/JSON-MaybeXS-1.003005/t/legacy.t new/JSON-MaybeXS-1.003008/t/legacy.t --- old/JSON-MaybeXS-1.003005/t/legacy.t 2015-03-08 09:07:51.000000000 +0100 +++ new/JSON-MaybeXS-1.003008/t/legacy.t 2016-06-29 00:15:32.000000000 +0200 @@ -1,8 +1,13 @@ use strict; use warnings; -use Test::Without::Module 'Cpanel::JSON::XS'; -use Test::More; +# hide Cpanel::JSON::XS +use lib map { + my ( $m, $c ) = ( $_, qq{die "Can't locate $_ (hidden)\n"} ); + sub { return unless $_[1] eq $m; open my $fh, "<", \$c; return $fh } +} qw{Cpanel/JSON/XS.pm}; + +use Test::More 0.88; use JSON::MaybeXS qw/:legacy/; my $in = '[1, 2, 3, 4]'; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/JSON-MaybeXS-1.003005/t/new.t new/JSON-MaybeXS-1.003008/t/new.t --- old/JSON-MaybeXS-1.003005/t/new.t 2015-03-08 09:07:51.000000000 +0100 +++ new/JSON-MaybeXS-1.003008/t/new.t 2015-12-26 01:28:35.000000000 +0100 @@ -1,6 +1,6 @@ use strict; use warnings; -use Test::More; +use Test::More 0.88; use JSON::MaybeXS (); our @call; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/JSON-MaybeXS-1.003005/t/none.t new/JSON-MaybeXS-1.003008/t/none.t --- old/JSON-MaybeXS-1.003005/t/none.t 2015-03-08 09:07:51.000000000 +0100 +++ new/JSON-MaybeXS-1.003008/t/none.t 2016-06-29 00:15:35.000000000 +0200 @@ -1,16 +1,18 @@ use strict; use warnings; -use Test::Without::Module 'Cpanel::JSON::XS'; -use Test::Without::Module 'JSON::XS'; -use Test::Without::Module 'JSON::PP'; -use Test::More; -ok(!eval { require JSON::MaybeXS; 1 }, 'Class failed to load'); +# hide Cpanel::JSON::XS, JSON::XS, JSON::PP +use lib map { + my ( $m, $c ) = ( $_, qq{die "Can't locate $_ (hidden)\n"} ); + sub { return unless $_[1] eq $m; open my $fh, "<", \$c; return $fh } +} qw{Cpanel/JSON/XS.pm JSON/XS.pm JSON/PP.pm}; + +use Test::More 0.88; -# Test::Without::Module always causes 'did not return a true value' errors +ok(!eval { require JSON::MaybeXS; 1 }, 'Class failed to load'); like( - $@, qr{Cpanel/JSON/XS.pm did not.*JSON/XS.pm did not.*JSON/PP.pm did not}s, + $@, qr{Can't locate Cpanel/JSON/XS\.pm.*Can't locate JSON/XS\.pm.*Can't locate JSON/PP\.pm}s, 'All errors reported' ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/JSON-MaybeXS-1.003005/t/pp.t new/JSON-MaybeXS-1.003008/t/pp.t --- old/JSON-MaybeXS-1.003005/t/pp.t 2015-03-08 09:07:51.000000000 +0100 +++ new/JSON-MaybeXS-1.003008/t/pp.t 2016-06-29 00:15:37.000000000 +0200 @@ -1,9 +1,14 @@ use strict; use warnings; -use Test::Without::Module 'Cpanel::JSON::XS', 'JSON::XS'; +# hide Cpanel::JSON::XS, JSON::XS +use lib map { + my ( $m, $c ) = ( $_, qq{die "Can't locate $_ (hidden)\n"} ); + sub { return unless $_[1] eq $m; open my $fh, "<", \$c; return $fh } +} qw{Cpanel/JSON/XS.pm JSON/XS.pm}; + use if !eval { require JSON::PP; 1; }, 'Test::More', skip_all => 'No JSON::PP'; -use Test::More; +use Test::More 0.88; use JSON::MaybeXS; diag 'Using JSON::PP ', JSON::PP->VERSION; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/JSON-MaybeXS-1.003005/t/preload_cpanel.t new/JSON-MaybeXS-1.003008/t/preload_cpanel.t --- old/JSON-MaybeXS-1.003005/t/preload_cpanel.t 2015-03-08 09:07:51.000000000 +0100 +++ new/JSON-MaybeXS-1.003008/t/preload_cpanel.t 2015-12-26 01:28:35.000000000 +0100 @@ -1,7 +1,7 @@ use strict; use warnings; use if !eval { require Cpanel::JSON::XS; 1; }, 'Test::More', skip_all => 'No Cpanel::JSON::XS'; -use Test::More; +use Test::More 0.88; use JSON::MaybeXS; diag 'Using Cpanel::JSON::XS ', Cpanel::JSON::XS->VERSION; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/JSON-MaybeXS-1.003005/t/preload_xs.t new/JSON-MaybeXS-1.003008/t/preload_xs.t --- old/JSON-MaybeXS-1.003005/t/preload_xs.t 2015-03-08 09:07:51.000000000 +0100 +++ new/JSON-MaybeXS-1.003008/t/preload_xs.t 2015-12-26 01:28:35.000000000 +0100 @@ -2,7 +2,7 @@ use warnings; use if !eval { require JSON::XS; 1; }, 'Test::More', skip_all => 'No JSON::XS'; -use Test::More; +use Test::More 0.88; use JSON::MaybeXS; diag 'Using JSON::XS ', JSON::XS->VERSION; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/JSON-MaybeXS-1.003005/t/xs.t new/JSON-MaybeXS-1.003008/t/xs.t --- old/JSON-MaybeXS-1.003005/t/xs.t 2015-03-08 09:07:51.000000000 +0100 +++ new/JSON-MaybeXS-1.003008/t/xs.t 2016-06-29 00:15:39.000000000 +0200 @@ -1,8 +1,13 @@ use strict; use warnings; -use Test::Without::Module 'Cpanel::JSON::XS'; -use Test::More; +# hide Cpanel::JSON::XS +use lib map { + my ( $m, $c ) = ( $_, qq{die "Can't locate $_ (hidden)\n"} ); + sub { return unless $_[1] eq $m; open my $fh, "<", \$c; return $fh } +} qw{Cpanel/JSON/XS.pm}; + +use Test::More 0.88; use JSON::MaybeXS; unless ( eval { require JSON::XS; 1 } ) { ++++++ cpanspec.yml ++++++ --- #description_paragraphs: 3 #description: |- # override description from CPAN #summary: override summary from CPAN #no_testing: broken upstream #sources: # - source1 # - source2 #patches: # foo.patch: -p1 # bar.patch: #preamble: |- # BuildRequires: gcc-c++ #post_prep: |- # hunspell=`pkg-config --libs hunspell | sed -e 's,-l,,; s, *,,g'` # sed -i -e "s,hunspell-X,$hunspell," t/00-prereq.t Makefile.PL #post_build: |- # rm unused.files #post_install: |- # sed on %{name}.files #license: SUSE-NonFree #skip_noarch: 1 #custom_build: |- #./Build build flags=%{?_smp_mflags} --myflag #custom_test: |- #startserver && make test #ignore_requires: Bizarre::Module