Skip Menu |
 

This queue is for tickets about the JSON-Any CPAN distribution.

Report information
The Basics
Id: 26966
Status: resolved
Worked: 1 hour (60 min)
Priority: 0/
Queue: JSON-Any

People
Owner: cpan [...] prather.org
Requestors: cpan [...] prather.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: Someone requested JSON::Any use $ENV as an alternate source for @order ... this patch implements that
Download (untitled) / with headers
text/plain 264b
People using MooseX::Storage don't directly use JSON::Any themselves and needed a way to set their local preferred ordering. Included is a patch to add a check for $ENV{JSON_ANY_ORDER} and to set @order properly. Also attached is a test for this new functionality.
Subject: 04-ENV.t
Download 04-ENV.t
text/x-perl 297b
#!/usr/bin/perl -w use strict; use Test::More tests => 3; BEGIN { $ENV{JSON_ANY_ORDER} = qw(JSON); } use JSON::Any; is_deeply( $ENV{JSON_ANY_ORDER}, qw(JSON) ); is( JSON::Any->handlerType, 'JSON' ); $ENV{JSON_ANY_ORDER} = qw(XS); JSON::Any->import(); is(JSON::Any->handlerType, 'JSON::XS');
Subject: env.patch
Download env.patch
text/x-diff 766b
--- /opt/local/lib/perl5/site_perl/5.8.8/JSON/Any.pm 2007-04-24 10:47:14.000000000 -0500 +++ JSON-Any/lib/JSON/Any.pm 2007-05-07 13:53:58.000000000 -0500 @@ -1,6 +1,6 @@ ############################################################################## # JSON::Any -# v1.04 +# v1.05 # Copyright (c) 2007 Chris Thompson ############################################################################## @@ -90,6 +90,7 @@ ( $handler, $encoder, $decoder ) = (); + @order = split /\s/, $ENV{JSON_ANY_ORDER} unless @order; @order = qw(XS JSON DWIW Syck) unless @order; foreach my $testmod (@order) { @@ -115,11 +116,11 @@ =head1 VERSION -Version 1.04 +Version 1.05 =cut -our $VERSION = '1.04'; +our $VERSION = '1.05'; =head1 SYNOPSIS
This is applied in 1.06


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.