r13785 - in /trunk/libconfig-json-perl: Changes META.yml README debian/changelog debian/rules 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:47:42 UTC 2008
Author: emhn-guest
Date: Mon Jan 28 11:47:42 2008
New Revision: 13785
URL: http://svn.debian.org/wsvn/?sc=1&rev=13785
Log:
* (NOT RELEASED YET) New upstream release
Modified:
trunk/libconfig-json-perl/Changes
trunk/libconfig-json-perl/META.yml
trunk/libconfig-json-perl/README
trunk/libconfig-json-perl/debian/changelog
trunk/libconfig-json-perl/debian/rules
trunk/libconfig-json-perl/lib/Config/JSON.pm
trunk/libconfig-json-perl/t/Config.t
Modified: trunk/libconfig-json-perl/Changes
URL: http://svn.debian.org/wsvn/trunk/libconfig-json-perl/Changes?rev=13785&op=diff
==============================================================================
--- trunk/libconfig-json-perl/Changes (original)
+++ trunk/libconfig-json-perl/Changes Mon Jan 28 11:47:42 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: trunk/libconfig-json-perl/META.yml
URL: http://svn.debian.org/wsvn/trunk/libconfig-json-perl/META.yml?rev=13785&op=diff
==============================================================================
--- trunk/libconfig-json-perl/META.yml (original)
+++ trunk/libconfig-json-perl/META.yml Mon Jan 28 11:47:42 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: trunk/libconfig-json-perl/README
URL: http://svn.debian.org/wsvn/trunk/libconfig-json-perl/README?rev=13785&op=diff
==============================================================================
--- trunk/libconfig-json-perl/README (original)
+++ trunk/libconfig-json-perl/README Mon Jan 28 11:47:42 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: trunk/libconfig-json-perl/debian/changelog
URL: http://svn.debian.org/wsvn/trunk/libconfig-json-perl/debian/changelog?rev=13785&op=diff
==============================================================================
--- trunk/libconfig-json-perl/debian/changelog (original)
+++ trunk/libconfig-json-perl/debian/changelog Mon Jan 28 11:47:42 2008
@@ -1,9 +1,10 @@
+libconfig-json-perl (1.1.4-1) UNRELEASED; urgency=low
+
+ * (NOT RELEASED YET) New upstream release
+
+ -- Ernesto Hernández-Novich (USB) <emhn at usb.ve> Mon, 28 Jan 2008 07:12:45 -0430
+
libconfig-json-perl (1.1.2-1) UNRELEASED; urgency=low
-
- TODO: drop dh_installexamples
- do not install README as it contains no information to the user
- ask upstream for clarification: README says copyright JT Smith,
- JSON.pm says copyright Plain Black
* Initial Release (Closes: #462536).
Modified: trunk/libconfig-json-perl/debian/rules
URL: http://svn.debian.org/wsvn/trunk/libconfig-json-perl/debian/rules?rev=13785&op=diff
==============================================================================
--- trunk/libconfig-json-perl/debian/rules (original)
+++ trunk/libconfig-json-perl/debian/rules Mon Jan 28 11:47:42 2008
@@ -29,9 +29,7 @@
# and VENDORARCHEXP environment variables.
# Add commands to compile the package here
- $(PERL) Makefile.PL INSTALLDIRS=vendor \
- INSTALLVENDORARCH=/usr/share/perl5/ \
- VENDORARCHEXP=/usr/share/perl5/
+ $(PERL) Makefile.PL INSTALLDIRS=vendor
$(MAKE)
$(MAKE) test
@@ -63,8 +61,7 @@
binary-indep: build install
dh_testdir
dh_testroot
- dh_installexamples
- dh_installdocs README
+ dh_installdocs
dh_installchangelogs Changes
dh_perl
dh_compress
Modified: trunk/libconfig-json-perl/lib/Config/JSON.pm
URL: http://svn.debian.org/wsvn/trunk/libconfig-json-perl/lib/Config/JSON.pm?rev=13785&op=diff
==============================================================================
--- trunk/libconfig-json-perl/lib/Config/JSON.pm (original)
+++ trunk/libconfig-json-perl/lib/Config/JSON.pm Mon Jan 28 11:47:42 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: trunk/libconfig-json-perl/t/Config.t
URL: http://svn.debian.org/wsvn/trunk/libconfig-json-perl/t/Config.t?rev=13785&op=diff
==============================================================================
--- trunk/libconfig-json-perl/t/Config.t (original)
+++ trunk/libconfig-json-perl/t/Config.t Mon Jan 28 11:47:42 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