r13783 - in /branches/upstream/libconfig-json-perl/current: Changes META.yml README lib/Config/JSON.pm t/Config.t
emhn-guest at users.alioth.debian.org
emhn-guest at users.alioth.debian.org
Mon Jan 28 11:42:27 UTC 2008
Author: emhn-guest
Date: Mon Jan 28 11:42:27 2008
New Revision: 13783
URL: http://svn.debian.org/wsvn/?sc=1&rev=13783
Log:
[svn-upgrade] Integrating new upstream version, libconfig-json-perl (1.1.4)
Modified:
branches/upstream/libconfig-json-perl/current/Changes
branches/upstream/libconfig-json-perl/current/META.yml
branches/upstream/libconfig-json-perl/current/README
branches/upstream/libconfig-json-perl/current/lib/Config/JSON.pm
branches/upstream/libconfig-json-perl/current/t/Config.t
Modified: branches/upstream/libconfig-json-perl/current/Changes
URL: http://svn.debian.org/wsvn/branches/upstream/libconfig-json-perl/current/Changes?rev=13783&op=diff
==============================================================================
--- branches/upstream/libconfig-json-perl/current/Changes (original)
+++ branches/upstream/libconfig-json-perl/current/Changes Mon Jan 28 11:42:27 2008
@@ -1,4 +1,11 @@
Revision history for Config-JSON
+
+1.1.4 Fri Jan 23 16:20:00 2008
+ Patch from Doug Bell that uses better slurping action, and fixes a problem with killing config files on set() errors.
+ Switched to using blib instead of relative lib path for tests.
+
+1.1.3 Fri Jan 23 15:00:00 2008
+ fix: Copyright was mistakenly assigned to me rather than Plain Black in the Readme
1.1.2 Thu Jan 23 23:00:00 2008
fix: #27078: predictable filename in /tmp
Modified: branches/upstream/libconfig-json-perl/current/META.yml
URL: http://svn.debian.org/wsvn/branches/upstream/libconfig-json-perl/current/META.yml?rev=13783&op=diff
==============================================================================
--- branches/upstream/libconfig-json-perl/current/META.yml (original)
+++ branches/upstream/libconfig-json-perl/current/META.yml Mon Jan 28 11:42:27 2008
@@ -1,7 +1,7 @@
# http://module-build.sourceforge.net/META-spec.html
#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
name: Config::JSON
-version: 1.1.2
+version: 1.1.4
version_from: lib/Config/JSON.pm
installdirs: site
requires:
Modified: branches/upstream/libconfig-json-perl/current/README
URL: http://svn.debian.org/wsvn/branches/upstream/libconfig-json-perl/current/README?rev=13783&op=diff
==============================================================================
--- branches/upstream/libconfig-json-perl/current/README (original)
+++ branches/upstream/libconfig-json-perl/current/README Mon Jan 28 11:42:27 2008
@@ -1,4 +1,4 @@
-Config-JSON version 1.1.2
+Config-JSON version 1.1.4
A JSON based config file parser/writer.
@@ -28,7 +28,7 @@
COPYRIGHT AND LICENCE
-Copyright (C) 2006-2008, JT Smith
+Copyright (C) 2006-2008, Plain Black Corporation
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
Modified: branches/upstream/libconfig-json-perl/current/lib/Config/JSON.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libconfig-json-perl/current/lib/Config/JSON.pm?rev=13783&op=diff
==============================================================================
--- branches/upstream/libconfig-json-perl/current/lib/Config/JSON.pm (original)
+++ branches/upstream/libconfig-json-perl/current/lib/Config/JSON.pm Mon Jan 28 11:42:27 2008
@@ -6,7 +6,7 @@
use Class::InsideOut qw(readonly id register private);
use JSON;
use List::Util;
-use version; our $VERSION = qv('1.1.2');
+use version; our $VERSION = qv('1.1.4');
use constant FILE_HEADER => "# config-file-type: JSON 1\n";
@@ -66,8 +66,11 @@
$directive = $directive->{$part};
}
delete $directive->{$lastPart};
+
+ # If JSON dies, don't kill our existing file.
+ my $json = JSON->new->pretty->encode($config{id $self});
if (open(my $FILE,">",$self->getFilePath)) {
- print $FILE FILE_HEADER."\n".JSON->new->pretty->encode($config{id $self});
+ print $FILE FILE_HEADER."\n".$json;
close($FILE);
}
else {
@@ -126,10 +129,8 @@
my $pathToFile = shift;
if (open(my $FILE, "<", $pathToFile)) {
# slurp
- my $holdTerminator = $/;
- undef $/;
+ local $/ = undef;
my $json = <$FILE>;
- $/ = $holdTerminator;
close($FILE);
my $conf = JSON->new->relaxed(1)->decode($json);
croak "Couldn't parse JSON in config file '$pathToFile'\n" unless ref $conf;
@@ -178,7 +179,7 @@
=head1 VERSION
-This document describes Config::JSON version 1.1.2
+This document describes Config::JSON version 1.1.4
=head1 SYNOPSIS
Modified: branches/upstream/libconfig-json-perl/current/t/Config.t
URL: http://svn.debian.org/wsvn/branches/upstream/libconfig-json-perl/current/t/Config.t?rev=13783&op=diff
==============================================================================
--- branches/upstream/libconfig-json-perl/current/t/Config.t (original)
+++ branches/upstream/libconfig-json-perl/current/t/Config.t Mon Jan 28 11:42:27 2008
@@ -1,6 +1,6 @@
use Test::More tests => 25;
-use lib '../lib';
+use blib;
use Test::Deep;
use Config::JSON;
use File::Temp qw/ tempfile /;
More information about the Pkg-perl-cvs-commits
mailing list