r52882 - in /trunk/libconfig-any-perl: ./ debian/ inc/Module/ inc/Module/Install/ lib/Config/ lib/Config/Any/

carnil-guest at users.alioth.debian.org carnil-guest at users.alioth.debian.org
Tue Feb 16 08:18:30 UTC 2010


Author: carnil-guest
Date: Tue Feb 16 08:18:23 2010
New Revision: 52882

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=52882
Log:
* New upstream release
* Add myself to Uploaders. 

Modified:
    trunk/libconfig-any-perl/Changes
    trunk/libconfig-any-perl/META.yml
    trunk/libconfig-any-perl/debian/changelog
    trunk/libconfig-any-perl/debian/control
    trunk/libconfig-any-perl/inc/Module/Install.pm
    trunk/libconfig-any-perl/inc/Module/Install/Base.pm
    trunk/libconfig-any-perl/inc/Module/Install/Can.pm
    trunk/libconfig-any-perl/inc/Module/Install/Fetch.pm
    trunk/libconfig-any-perl/inc/Module/Install/Makefile.pm
    trunk/libconfig-any-perl/inc/Module/Install/Metadata.pm
    trunk/libconfig-any-perl/inc/Module/Install/Win32.pm
    trunk/libconfig-any-perl/inc/Module/Install/WriteAll.pm
    trunk/libconfig-any-perl/lib/Config/Any.pm
    trunk/libconfig-any-perl/lib/Config/Any/General.pm
    trunk/libconfig-any-perl/lib/Config/Any/INI.pm
    trunk/libconfig-any-perl/lib/Config/Any/JSON.pm
    trunk/libconfig-any-perl/lib/Config/Any/Perl.pm
    trunk/libconfig-any-perl/lib/Config/Any/XML.pm
    trunk/libconfig-any-perl/lib/Config/Any/YAML.pm

Modified: trunk/libconfig-any-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconfig-any-perl/Changes?rev=52882&op=diff
==============================================================================
--- trunk/libconfig-any-perl/Changes (original)
+++ trunk/libconfig-any-perl/Changes Tue Feb 16 08:18:23 2010
@@ -1,4 +1,9 @@
 Revision history for Config-Any
+
+0.19 Mon 15 Feb 2010
+    - add JSON::DWIW to the top of the JSON loaders list (caelum)
+    - remove need for caching in Perl loader by using do() instead
+      of require() (caelum)
 
 0.18 Mon 16 Nov 2009
     - ensure XML loader's _coerce() method checks specifically for HASH refs

Modified: trunk/libconfig-any-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconfig-any-perl/META.yml?rev=52882&op=diff
==============================================================================
--- trunk/libconfig-any-perl/META.yml (original)
+++ trunk/libconfig-any-perl/META.yml Tue Feb 16 08:18:23 2010
@@ -8,7 +8,7 @@
 configure_requires:
   ExtUtils::MakeMaker: 6.42
 distribution_type: module
-generated_by: 'Module::Install version 0.91'
+generated_by: 'Module::Install version 0.93'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -24,4 +24,4 @@
 resources:
   license: http://dev.perl.org/licenses/
   repository: http://dev.catalyst.perl.org/repos/Catalyst/trunk/Config-Any/
-version: 0.18
+version: 0.19

Modified: trunk/libconfig-any-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconfig-any-perl/debian/changelog?rev=52882&op=diff
==============================================================================
--- trunk/libconfig-any-perl/debian/changelog (original)
+++ trunk/libconfig-any-perl/debian/changelog Tue Feb 16 08:18:23 2010
@@ -1,3 +1,10 @@
+libconfig-any-perl (0.19-1) UNRELEASED; urgency=low
+
+  * New upstream release
+  * Add myself to Uploaders. 
+
+ -- Salvatore Bonaccorso <salvatore.bonaccorso at gmail.com>  Tue, 16 Feb 2010 09:17:23 +0100
+
 libconfig-any-perl (0.18-1) unstable; urgency=low
 
   [ Jonathan Yu ]

Modified: trunk/libconfig-any-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconfig-any-perl/debian/control?rev=52882&op=diff
==============================================================================
--- trunk/libconfig-any-perl/debian/control (original)
+++ trunk/libconfig-any-perl/debian/control Tue Feb 16 08:18:23 2010
@@ -11,7 +11,8 @@
 Uploaders: Krzysztof Krzyzaniak (eloy) <eloy at debian.org>,
  Damyan Ivanov <dmn at debian.org>, Gunnar Wolf <gwolf at debian.org>,
  Rene Mayorga <rmayorga at debian.org>, Ansgar Burchardt <ansgar at 43-1.org>,
- gregor herrmann <gregoa at debian.org>, Jonathan Yu <jawnsy at cpan.org>
+ gregor herrmann <gregoa at debian.org>, Jonathan Yu <jawnsy at cpan.org>,
+ Salvatore Bonaccorso <salvatore.bonaccorso at gmail.com>
 Standards-Version: 3.8.3
 Homepage: http://search.cpan.org/dist/Config-Any/
 Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libconfig-any-perl/

Modified: trunk/libconfig-any-perl/inc/Module/Install.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconfig-any-perl/inc/Module/Install.pm?rev=52882&op=diff
==============================================================================
--- trunk/libconfig-any-perl/inc/Module/Install.pm (original)
+++ trunk/libconfig-any-perl/inc/Module/Install.pm Tue Feb 16 08:18:23 2010
@@ -28,7 +28,7 @@
 	# This is not enforced yet, but will be some time in the next few
 	# releases once we can make sure it won't clash with custom
 	# Module::Install extensions.
-	$VERSION = '0.91';
+	$VERSION = '0.93';
 
 	# Storage for the pseudo-singleton
 	$MAIN    = undef;
@@ -348,17 +348,24 @@
 	return $call;
 }
 
+# Done in evals to avoid confusing Perl::MinimumVersion
+eval( $] >= 5.006 ? <<'END_NEW' : <<'END_OLD' ); die $@ if $@;
 sub _read {
 	local *FH;
-	if ( $] >= 5.006 ) {
-		open( FH, '<', $_[0] ) or die "open($_[0]): $!";
-	} else {
-		open( FH, "< $_[0]"  ) or die "open($_[0]): $!";
-	}
+	open( FH, '<', $_[0] ) or die "open($_[0]): $!";
 	my $string = do { local $/; <FH> };
 	close FH or die "close($_[0]): $!";
 	return $string;
 }
+END_NEW
+sub _read {
+	local *FH;
+	open( FH, "< $_[0]"  ) or die "open($_[0]): $!";
+	my $string = do { local $/; <FH> };
+	close FH or die "close($_[0]): $!";
+	return $string;
+}
+END_OLD
 
 sub _readperl {
 	my $string = Module::Install::_read($_[0]);
@@ -379,18 +386,26 @@
 	return $string;
 }
 
+# Done in evals to avoid confusing Perl::MinimumVersion
+eval( $] >= 5.006 ? <<'END_NEW' : <<'END_OLD' ); die $@ if $@;
 sub _write {
 	local *FH;
-	if ( $] >= 5.006 ) {
-		open( FH, '>', $_[0] ) or die "open($_[0]): $!";
-	} else {
-		open( FH, "> $_[0]"  ) or die "open($_[0]): $!";
-	}
+	open( FH, '>', $_[0] ) or die "open($_[0]): $!";
 	foreach ( 1 .. $#_ ) {
 		print FH $_[$_] or die "print($_[0]): $!";
 	}
 	close FH or die "close($_[0]): $!";
 }
+END_NEW
+sub _write {
+	local *FH;
+	open( FH, "> $_[0]"  ) or die "open($_[0]): $!";
+	foreach ( 1 .. $#_ ) {
+		print FH $_[$_] or die "print($_[0]): $!";
+	}
+	close FH or die "close($_[0]): $!";
+}
+END_OLD
 
 # _version is for processing module versions (eg, 1.03_05) not
 # Perl versions (eg, 5.8.1).
@@ -427,4 +442,4 @@
 
 1;
 
-# Copyright 2008 - 2009 Adam Kennedy.
+# Copyright 2008 - 2010 Adam Kennedy.

Modified: trunk/libconfig-any-perl/inc/Module/Install/Base.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconfig-any-perl/inc/Module/Install/Base.pm?rev=52882&op=diff
==============================================================================
--- trunk/libconfig-any-perl/inc/Module/Install/Base.pm (original)
+++ trunk/libconfig-any-perl/inc/Module/Install/Base.pm Tue Feb 16 08:18:23 2010
@@ -4,7 +4,7 @@
 use strict 'vars';
 use vars qw{$VERSION};
 BEGIN {
-	$VERSION = '0.91';
+	$VERSION = '0.93';
 }
 
 # Suspend handler for "redefined" warnings

Modified: trunk/libconfig-any-perl/inc/Module/Install/Can.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconfig-any-perl/inc/Module/Install/Can.pm?rev=52882&op=diff
==============================================================================
--- trunk/libconfig-any-perl/inc/Module/Install/Can.pm (original)
+++ trunk/libconfig-any-perl/inc/Module/Install/Can.pm Tue Feb 16 08:18:23 2010
@@ -9,7 +9,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.91';
+	$VERSION = '0.93';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }

Modified: trunk/libconfig-any-perl/inc/Module/Install/Fetch.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconfig-any-perl/inc/Module/Install/Fetch.pm?rev=52882&op=diff
==============================================================================
--- trunk/libconfig-any-perl/inc/Module/Install/Fetch.pm (original)
+++ trunk/libconfig-any-perl/inc/Module/Install/Fetch.pm Tue Feb 16 08:18:23 2010
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.91';
+	$VERSION = '0.93';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }

Modified: trunk/libconfig-any-perl/inc/Module/Install/Makefile.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconfig-any-perl/inc/Module/Install/Makefile.pm?rev=52882&op=diff
==============================================================================
--- trunk/libconfig-any-perl/inc/Module/Install/Makefile.pm (original)
+++ trunk/libconfig-any-perl/inc/Module/Install/Makefile.pm Tue Feb 16 08:18:23 2010
@@ -7,7 +7,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.91';
+	$VERSION = '0.93';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }
@@ -34,6 +34,17 @@
 	}
 }
 
+# Store a cleaned up version of the MakeMaker version,
+# since we need to behave differently in a variety of
+# ways based on the MM version.
+my $makemaker = eval $ExtUtils::MakeMaker::VERSION;
+
+# If we are passed a param, do a "newer than" comparison.
+# Otherwise, just return the MakeMaker version.
+sub makemaker {
+	( @_ < 2 or $makemaker >= eval($_[1]) ) ? $makemaker : 0
+}
+
 sub makemaker_args {
 	my $self = shift;
 	my $args = ( $self->{makemaker_args} ||= {} );
@@ -44,7 +55,7 @@
 # For mm args that take multiple space-seperated args,
 # append an argument to the current list.
 sub makemaker_append {
-	my $self = sShift;
+	my $self = shift;
 	my $name = shift;
 	my $args = $self->makemaker_args;
 	$args->{name} = defined $args->{$name}
@@ -107,6 +118,9 @@
 	%test_dir = ();
 	require File::Find;
 	File::Find::find( \&_wanted_t, $dir );
+	if ( -d 'xt' and ($ENV{RELEASE_TESTING} or $self->author) ) {
+		File::Find::find( \&_wanted_t, 'xt' );
+	}
 	$self->tests( join ' ', map { "$_/*.t" } sort keys %test_dir );
 }
 
@@ -130,12 +144,13 @@
 		# an underscore, even though its own version may contain one!
 		# Hence the funny regexp to get rid of it.  See RT #35800
 		# for details.
-		$self->build_requires( 'ExtUtils::MakeMaker' => $ExtUtils::MakeMaker::VERSION =~ /^(\d+\.\d+)/ );
-		$self->configure_requires( 'ExtUtils::MakeMaker' => $ExtUtils::MakeMaker::VERSION =~ /^(\d+\.\d+)/ );
+		my $v = $ExtUtils::MakeMaker::VERSION =~ /^(\d+\.\d+)/;
+		$self->build_requires(     'ExtUtils::MakeMaker' => $v );
+		$self->configure_requires( 'ExtUtils::MakeMaker' => $v );
 	} else {
 		# Allow legacy-compatibility with 5.005 by depending on the
 		# most recent EU:MM that supported 5.005.
-		$self->build_requires( 'ExtUtils::MakeMaker' => 6.42 );
+		$self->build_requires(     'ExtUtils::MakeMaker' => 6.42 );
 		$self->configure_requires( 'ExtUtils::MakeMaker' => 6.42 );
 	}
 
@@ -145,49 +160,75 @@
 	$args->{NAME}     = $self->module_name || $self->name;
 	$args->{VERSION}  = $self->version;
 	$args->{NAME}     =~ s/-/::/g;
+	$DB::single = 1;
 	if ( $self->tests ) {
 		$args->{test} = { TESTS => $self->tests };
+	} elsif ( -d 'xt' and ($self->author or $ENV{RELEASE_TESTING}) ) {
+		$args->{test} = {
+			TESTS => join( ' ', map { "$_/*.t" } grep { -d $_ } qw{ t xt } ),
+		};
 	}
 	if ( $] >= 5.005 ) {
 		$args->{ABSTRACT} = $self->abstract;
 		$args->{AUTHOR}   = $self->author;
 	}
-	if ( eval($ExtUtils::MakeMaker::VERSION) >= 6.10 ) {
-		$args->{NO_META} = 1;
-	}
-	if ( eval($ExtUtils::MakeMaker::VERSION) > 6.17 and $self->sign ) {
+	if ( $self->makemaker(6.10) ) {
+		$args->{NO_META}   = 1;
+		#$args->{NO_MYMETA} = 1;
+	}
+	if ( $self->makemaker(6.17) and $self->sign ) {
 		$args->{SIGN} = 1;
 	}
 	unless ( $self->is_admin ) {
 		delete $args->{SIGN};
 	}
 
-	# Merge both kinds of requires into prereq_pm
 	my $prereq = ($args->{PREREQ_PM} ||= {});
 	%$prereq = ( %$prereq,
-		map { @$_ }
+		map { @$_ } # flatten [module => version]
 		map { @$_ }
 		grep $_,
-		($self->configure_requires, $self->build_requires, $self->requires)
+		($self->requires)
 	);
 
 	# Remove any reference to perl, PREREQ_PM doesn't support it
 	delete $args->{PREREQ_PM}->{perl};
 
-	# merge both kinds of requires into prereq_pm
+	# Merge both kinds of requires into BUILD_REQUIRES
+	my $build_prereq = ($args->{BUILD_REQUIRES} ||= {});
+	%$build_prereq = ( %$build_prereq,
+		map { @$_ } # flatten [module => version]
+		map { @$_ }
+		grep $_,
+		($self->configure_requires, $self->build_requires)
+	);
+
+	# Remove any reference to perl, BUILD_REQUIRES doesn't support it
+	delete $args->{BUILD_REQUIRES}->{perl};
+
+	# Delete bundled dists from prereq_pm
 	my $subdirs = ($args->{DIR} ||= []);
 	if ($self->bundles) {
 		foreach my $bundle (@{ $self->bundles }) {
 			my ($file, $dir) = @$bundle;
 			push @$subdirs, $dir if -d $dir;
-			delete $prereq->{$file};
+			delete $build_prereq->{$file}; #Delete from build prereqs only
 		}
+	}
+
+	unless ( $self->makemaker('6.55_03') ) {
+		%$prereq = (%$prereq,%$build_prereq);
+		delete $args->{BUILD_REQUIRES};
 	}
 
 	if ( my $perl_version = $self->perl_version ) {
 		eval "use $perl_version; 1"
 			or die "ERROR: perl: Version $] is installed, "
 			. "but we need version >= $perl_version";
+
+		if ( $self->makemaker(6.48) ) {
+			$args->{MIN_PERL_VERSION} = $perl_version;
+		}
 	}
 
 	$args->{INSTALLDIRS} = $self->installdirs;
@@ -265,4 +306,4 @@
 
 __END__
 
-#line 394
+#line 435

Modified: trunk/libconfig-any-perl/inc/Module/Install/Metadata.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconfig-any-perl/inc/Module/Install/Metadata.pm?rev=52882&op=diff
==============================================================================
--- trunk/libconfig-any-perl/inc/Module/Install/Metadata.pm (original)
+++ trunk/libconfig-any-perl/inc/Module/Install/Metadata.pm Tue Feb 16 08:18:23 2010
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.91';
+	$VERSION = '0.93';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }
@@ -230,6 +230,8 @@
 		die("The path '$file' does not exist, or is not a file");
 	}
 
+	$self->{values}{all_from} = $file;
+
 	# Some methods pull from POD instead of code.
 	# If there is a matching .pod, use that instead
 	my $pod = $file;
@@ -385,11 +387,10 @@
 	}
 }
 
-sub perl_version_from {
-	my $self = shift;
+sub _extract_perl_version {
 	if (
-		Module::Install::_read($_[0]) =~ m/
-		^
+		$_[0] =~ m/
+		^\s*
 		(?:use|require) \s*
 		v?
 		([\d_\.]+)
@@ -398,6 +399,16 @@
 	) {
 		my $perl_version = $1;
 		$perl_version =~ s{_}{}g;
+		return $perl_version;
+	} else {
+		return;
+	}
+}
+
+sub perl_version_from {
+	my $self = shift;
+	my $perl_version=_extract_perl_version(Module::Install::_read($_[0]));
+	if ($perl_version) {
 		$self->perl_version($perl_version);
 	} else {
 		warn "Cannot determine perl version info from $_[0]\n";
@@ -425,13 +436,12 @@
 	}
 }
 
-sub license_from {
-	my $self = shift;
+sub _extract_license {
 	if (
-		Module::Install::_read($_[0]) =~ m/
+		$_[0] =~ m/
 		(
 			=head \d \s+
-			(?:licen[cs]e|licensing|copyright|legal)\b
+			(?:licen[cs]e|licensing|copyrights?|legal)\b
 			.*?
 		)
 		(=head\\d.*|=cut.*|)
@@ -439,7 +449,9 @@
 	/ixms ) {
 		my $license_text = $1;
 		my @phrases      = (
-			'under the same (?:terms|license) as (?:perl|the perl programming language) itself' => 'perl', 1,
+			'under the same (?:terms|license) as (?:perl|the perl programming language)' => 'perl', 1,
+			'under the terms of (?:perl|the perl programming language) itself' => 'perl', 1,
+			'Artistic and GPL'                   => 'perl',        1,
 			'GNU general public license'         => 'gpl',         1,
 			'GNU public license'                 => 'gpl',         1,
 			'GNU lesser general public license'  => 'lgpl',        1,
@@ -456,20 +468,32 @@
 			'proprietary'                        => 'proprietary', 0,
 		);
 		while ( my ($pattern, $license, $osi) = splice(@phrases, 0, 3) ) {
-			$pattern =~ s{\s+}{\\s+}g;
+			$pattern =~ s#\s+#\\s+#gs;
 			if ( $license_text =~ /\b$pattern\b/i ) {
-				$self->license($license);
-				return 1;
+			        return $license;
 			}
 		}
-	}
-
-	warn "Cannot determine license info from $_[0]\n";
-	return 'unknown';
+	} else {
+	        return;
+	}
+}
+
+sub license_from {
+	my $self = shift;
+	if (my $license=_extract_license(Module::Install::_read($_[0]))) {
+		$self->license($license);
+	} else {
+		warn "Cannot determine license info from $_[0]\n";
+		return 'unknown';
+	}
 }
 
 sub _extract_bugtracker {
-	my @links   = $_[0] =~ m#L<(\Qhttp://rt.cpan.org/\E[^>]+)>#g;
+	my @links   = $_[0] =~ m#L<(
+	 \Qhttp://rt.cpan.org/\E[^>]+|
+	 \Qhttp://github.com/\E[\w_]+/[\w_]+/issues|
+	 \Qhttp://code.google.com/p/\E[\w_\-]+/issues/list
+	 )>#gx;
 	my %links;
 	@links{@links}=();
 	@links=keys %links;
@@ -485,7 +509,7 @@
 		return 0;
 	}
 	if ( @links > 1 ) {
-		warn "Found more than on rt.cpan.org link in $_[0]\n";
+		warn "Found more than one bugtracker link in $_[0]\n";
 		return 0;
 	}
 

Modified: trunk/libconfig-any-perl/inc/Module/Install/Win32.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconfig-any-perl/inc/Module/Install/Win32.pm?rev=52882&op=diff
==============================================================================
--- trunk/libconfig-any-perl/inc/Module/Install/Win32.pm (original)
+++ trunk/libconfig-any-perl/inc/Module/Install/Win32.pm Tue Feb 16 08:18:23 2010
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.91';
+	$VERSION = '0.93';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }

Modified: trunk/libconfig-any-perl/inc/Module/Install/WriteAll.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconfig-any-perl/inc/Module/Install/WriteAll.pm?rev=52882&op=diff
==============================================================================
--- trunk/libconfig-any-perl/inc/Module/Install/WriteAll.pm (original)
+++ trunk/libconfig-any-perl/inc/Module/Install/WriteAll.pm Tue Feb 16 08:18:23 2010
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.91';;
+	$VERSION = '0.93';;
 	@ISA     = qw{Module::Install::Base};
 	$ISCORE  = 1;
 }

Modified: trunk/libconfig-any-perl/lib/Config/Any.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconfig-any-perl/lib/Config/Any.pm?rev=52882&op=diff
==============================================================================
--- trunk/libconfig-any-perl/lib/Config/Any.pm (original)
+++ trunk/libconfig-any-perl/lib/Config/Any.pm Tue Feb 16 08:18:23 2010
@@ -6,7 +6,7 @@
 use Carp;
 use Module::Pluggable::Object ();
 
-our $VERSION = '0.18';
+our $VERSION = '0.19';
 
 =head1 NAME
 

Modified: trunk/libconfig-any-perl/lib/Config/Any/General.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconfig-any-perl/lib/Config/Any/General.pm?rev=52882&op=diff
==============================================================================
--- trunk/libconfig-any-perl/lib/Config/Any/General.pm (original)
+++ trunk/libconfig-any-perl/lib/Config/Any/General.pm Tue Feb 16 08:18:23 2010
@@ -88,7 +88,7 @@
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright 2006-2009 by Brian Cassidy
+Copyright 2006-2010 by Brian Cassidy
 
 Portions Copyright 2006 Portugal Telecom
 

Modified: trunk/libconfig-any-perl/lib/Config/Any/INI.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconfig-any-perl/lib/Config/Any/INI.pm?rev=52882&op=diff
==============================================================================
--- trunk/libconfig-any-perl/lib/Config/Any/INI.pm (original)
+++ trunk/libconfig-any-perl/lib/Config/Any/INI.pm Tue Feb 16 08:18:23 2010
@@ -103,7 +103,7 @@
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright 2006-2009 by Brian Cassidy, portions copyright 2006, 2007 by Joel Bernstein
+Copyright 2006-2010 by Brian Cassidy, portions copyright 2006, 2007 by Joel Bernstein
 
 This library is free software; you can redistribute it and/or modify
 it under the same terms as Perl itself. 

Modified: trunk/libconfig-any-perl/lib/Config/Any/JSON.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconfig-any-perl/lib/Config/Any/JSON.pm?rev=52882&op=diff
==============================================================================
--- trunk/libconfig-any-perl/lib/Config/Any/JSON.pm (original)
+++ trunk/libconfig-any-perl/lib/Config/Any/JSON.pm Tue Feb 16 08:18:23 2010
@@ -49,9 +49,18 @@
     my $content = do { local $/; <$fh> };
     close $fh;
 
+    eval { require JSON::DWIW; };
+    unless( $@ ) {
+        my $decoder = JSON::DWIW->new;
+        my ( $data, $error ) = $decoder->from_json( $content );
+        die $error if $error;
+        return $data;
+    }
+
     eval { require JSON::XS; };
     unless( $@ ) {
-        return JSON::XS::decode_json( $content );
+        my $decoder = JSON::XS->new->relaxed;
+        return $decoder->decode( $content );
     }
 
     eval { require JSON::Syck; };
@@ -66,12 +75,12 @@
 
 =head2 requires_any_of( )
 
-Specifies that this modules requires one of,  L<JSON::XS>, L<JSON::Syck> or
-L<JSON> in order to work.
+Specifies that this modules requires one of,  L<JSON::DWIW>, L<JSON::XS>,
+L<JSON::Syck> or L<JSON> in order to work.
 
 =cut
 
-sub requires_any_of { 'JSON::XS', 'JSON::Syck', 'JSON' }
+sub requires_any_of { 'JSON::DWIW', 'JSON::XS', 'JSON::Syck', 'JSON' }
 
 =head1 AUTHOR
 
@@ -79,7 +88,7 @@
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright 2006-2009 by Brian Cassidy
+Copyright 2006-2010 by Brian Cassidy
 
 This library is free software; you can redistribute it and/or modify
 it under the same terms as Perl itself. 
@@ -92,11 +101,13 @@
 
 =item * L<Config::Any>
 
-=item * L<JSON>
+=item * L<JSON::DWIW>
+
+=item * L<JSON::XS>
 
 =item * L<JSON::Syck>
 
-=item * L<JSON::XS>
+=item * L<JSON>
 
 =back
 

Modified: trunk/libconfig-any-perl/lib/Config/Any/Perl.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconfig-any-perl/lib/Config/Any/Perl.pm?rev=52882&op=diff
==============================================================================
--- trunk/libconfig-any-perl/lib/Config/Any/Perl.pm (original)
+++ trunk/libconfig-any-perl/lib/Config/Any/Perl.pm Tue Feb 16 08:18:23 2010
@@ -4,8 +4,6 @@
 use warnings;
 
 use base 'Config::Any::Base';
-
-my %cache;
 
 =head1 NAME
 
@@ -46,12 +44,14 @@
 sub load {
     my $class = shift;
     my $file  = shift;
-    my $content;
 
-    unless ( $content = $cache{ $file } ) {
-        $content = require $file;
-        $cache{ $file } = $content;
+    my( $exception, $content );
+    {
+        local $@;
+        $content = do $file;
+        $exception = $@;
     }
+    die $exception if $exception;
 
     return $content;
 }
@@ -62,7 +62,7 @@
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright 2006-2009 by Brian Cassidy
+Copyright 2006-2010 by Brian Cassidy
 
 This library is free software; you can redistribute it and/or modify
 it under the same terms as Perl itself. 

Modified: trunk/libconfig-any-perl/lib/Config/Any/XML.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconfig-any-perl/lib/Config/Any/XML.pm?rev=52882&op=diff
==============================================================================
--- trunk/libconfig-any-perl/lib/Config/Any/XML.pm (original)
+++ trunk/libconfig-any-perl/lib/Config/Any/XML.pm Tue Feb 16 08:18:23 2010
@@ -101,7 +101,7 @@
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright 2006-2009 by Brian Cassidy
+Copyright 2006-2010 by Brian Cassidy
 
 This library is free software; you can redistribute it and/or modify
 it under the same terms as Perl itself. 

Modified: trunk/libconfig-any-perl/lib/Config/Any/YAML.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconfig-any-perl/lib/Config/Any/YAML.pm?rev=52882&op=diff
==============================================================================
--- trunk/libconfig-any-perl/lib/Config/Any/YAML.pm (original)
+++ trunk/libconfig-any-perl/lib/Config/Any/YAML.pm Tue Feb 16 08:18:23 2010
@@ -81,7 +81,7 @@
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright 2006-2009 by Brian Cassidy
+Copyright 2006-2010 by Brian Cassidy
 
 This library is free software; you can redistribute it and/or modify
 it under the same terms as Perl itself. 




More information about the Pkg-perl-cvs-commits mailing list