Author: cweyl Update of /cvs/extras/rpms/perl-JSON-Any/F-7 In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv11405 Modified Files: perl-JSON-Any.spec Added Files: with_older_json.patch Log Message: * Sat Mar 22 2008 Chris Weyl <cweyl@xxxxxxxxxxxxxxx> 1.16-3 - patch to allow utf8 to work properly with JSON::XS earlier than version 2 - patch to skip JSON when JSON is earlier than version 2 with_older_json.patch: --- NEW FILE with_older_json.patch --- diff -ur JSON-Any-1.16.orig/lib/JSON/Any.pm JSON-Any-1.16/lib/JSON/Any.pm --- JSON-Any-1.16.orig/lib/JSON/Any.pm 2008-02-13 15:15:46.000000000 -0800 +++ JSON-Any-1.16/lib/JSON/Any.pm 2008-03-22 10:50:12.831848606 -0700 @@ -110,6 +110,8 @@ max_depth ); + local $conf->{utf8} = !$conf->{utf8}; # it means the opposite + my $obj = $handler->new; for my $mutator (@params) { next unless exists $conf->{$mutator}; @@ -199,6 +201,7 @@ foreach my $testmod (@order) { $testmod = "JSON::$testmod" unless $testmod eq "JSON"; eval "require $testmod"; + $@ = 'JSON too old' if $testmod eq 'JSON' && "$JSON::VERSION" =~ /^1/; unless ($@) { $handler = $testmod; my $key = _make_key($handler); diff -ur JSON-Any-1.16.orig/t/04-ENV.t JSON-Any-1.16/t/04-ENV.t --- JSON-Any-1.16.orig/t/04-ENV.t 2008-01-01 12:05:35.000000000 -0800 +++ JSON-Any-1.16/t/04-ENV.t 2008-03-22 10:36:06.260856865 -0700 @@ -13,7 +13,8 @@ SKIP: { eval { require JSON; }; - skip "JSON not installed: $@", 1 if $@; + skip "JSON unusable or not installed: $@", 1 + if $@ || $JSON::VERSION =~ /^1/; $ENV{JSON_ANY_ORDER} = qw(JSON); JSON::Any->import(); Index: perl-JSON-Any.spec =================================================================== RCS file: /cvs/extras/rpms/perl-JSON-Any/F-7/perl-JSON-Any.spec,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- perl-JSON-Any.spec 12 Mar 2008 19:11:30 -0000 1.1 +++ perl-JSON-Any.spec 22 Mar 2008 18:53:23 -0000 1.2 @@ -1,6 +1,6 @@ Name: perl-JSON-Any Version: 1.16 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A meta-module to make working with JSON easier License: GPL+ or Artistic Group: Development/Libraries @@ -10,6 +10,8 @@ BuildArch: noarch Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) +Patch: with_older_json.patch + # JSON::XS is fastest, so we require it Requires: perl(JSON::XS) @@ -35,6 +37,7 @@ %prep %setup -q -n JSON-Any-%{version} +%patch0 -p1 find . -type f -exec chmod -c -x {} + find t/ -type f -exec perl -pi -e 's|^#!perl|#!/usr/bin/perl|' {} + @@ -69,6 +72,10 @@ %{_mandir}/man3/* %changelog +* Sat Mar 22 2008 Chris Weyl <cweyl@xxxxxxxxxxxxxxx> 1.16-3 +- patch to allow utf8 to work properly with JSON::XS earlier than version 2 +- patch to skip JSON when JSON is earlier than version 2 + * Wed Mar 12 2008 Chris Weyl <cweyl@xxxxxxxxxxxxxxx> 1.16-2 - bump -- Fedora Extras Perl SIG http://www.fedoraproject.org/wiki/Extras/SIGs/Perl Fedora-perl-devel-list mailing list Fedora-perl-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/fedora-perl-devel-list