r26372 - in /branches/upstream/libconfig-json-perl/current: .cvsignore Changes MANIFEST META.yml README lib/Config/JSON.pm t/00.load.t t/Config.t t/Duplicate.t t/Include.t t/Wildcard.t

emhn-guest at users.alioth.debian.org emhn-guest at users.alioth.debian.org
Thu Oct 30 14:30:20 UTC 2008


Author: emhn-guest
Date: Thu Oct 30 14:30:18 2008
New Revision: 26372

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=26372
Log:
[svn-upgrade] Integrating new upstream version, libconfig-json-perl (1.3.0)

Added:
    branches/upstream/libconfig-json-perl/current/.cvsignore
Modified:
    branches/upstream/libconfig-json-perl/current/Changes
    branches/upstream/libconfig-json-perl/current/MANIFEST
    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/00.load.t
    branches/upstream/libconfig-json-perl/current/t/Config.t
    branches/upstream/libconfig-json-perl/current/t/Duplicate.t
    branches/upstream/libconfig-json-perl/current/t/Include.t
    branches/upstream/libconfig-json-perl/current/t/Wildcard.t

Added: branches/upstream/libconfig-json-perl/current/.cvsignore
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-json-perl/current/.cvsignore?rev=26372&op=file
==============================================================================
--- branches/upstream/libconfig-json-perl/current/.cvsignore (added)
+++ branches/upstream/libconfig-json-perl/current/.cvsignore Thu Oct 30 14:30:18 2008
@@ -1,0 +1,10 @@
+blib*
+Makefile
+Makefile.old
+Build
+_build*
+pm_to_blib*
+*.tar.gz
+.lwpcookies
+Config-JSON-*
+cover_db

Modified: branches/upstream/libconfig-json-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-json-perl/current/Changes?rev=26372&op=diff
==============================================================================
--- branches/upstream/libconfig-json-perl/current/Changes (original)
+++ branches/upstream/libconfig-json-perl/current/Changes Thu Oct 30 14:30:18 2008
@@ -1,4 +1,8 @@
 Revision history for Config-JSON
+
+1.3.0   Tue Oct 28 23:00:00 2008
+    Rewrote includes to be much cleaner.
+    Fixed a bug where a full disk could cause Config::JSON to destroy the config file.
 
 1.2.1   Sat Oct 18 16:58:19 EDT 2008
     Fixed version number.

Modified: branches/upstream/libconfig-json-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-json-perl/current/MANIFEST?rev=26372&op=diff
==============================================================================
--- branches/upstream/libconfig-json-perl/current/MANIFEST (original)
+++ branches/upstream/libconfig-json-perl/current/MANIFEST Thu Oct 30 14:30:18 2008
@@ -6,9 +6,6 @@
 lib/Config/JSON.pm
 t/00.load.t
 t/Config.t
-t/Duplicate.t
-t/Include.t
-t/Wildcard.t
 authors.t/perlcritic.t
 authors.t/pod-coverage.t
 authors.t/pod.t

Modified: branches/upstream/libconfig-json-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-json-perl/current/META.yml?rev=26372&op=diff
==============================================================================
--- branches/upstream/libconfig-json-perl/current/META.yml (original)
+++ branches/upstream/libconfig-json-perl/current/META.yml Thu Oct 30 14:30:18 2008
@@ -1,20 +1,17 @@
---- #YAML:1.0
-name:                Config-JSON
-version:             1.2.1
-abstract:            A JSON based config file system.
-license:             ~
-author:              
-    - JT Smith <jt at plainblack.com>
-generated_by:        ExtUtils::MakeMaker version 6.42
-distribution_type:   module
-requires:     
-    Class::InsideOut:              0
-    File::Temp:                    0
-    JSON:                          2
-    List::Util:                    0
-    Test::Deep:                    0
-    Test::More:                    0
-    version:                       0
-meta-spec:
-    url:     http://module-build.sourceforge.net/META-spec-v1.3.html
-    version: 1.3
+# 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.3.0
+version_from: lib/Config/JSON.pm
+installdirs:  site
+requires:
+    List::Util:             0
+    Class::InsideOut:       0
+    JSON:                   2.0	
+    Test::More:             0
+    Test::Deep:             0
+    File::Temp:             0
+
+distribution_type: module
+generated_by: ExtUtils::MakeMaker version 6.17
+

Modified: branches/upstream/libconfig-json-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-json-perl/current/README?rev=26372&op=diff
==============================================================================
--- branches/upstream/libconfig-json-perl/current/README (original)
+++ branches/upstream/libconfig-json-perl/current/README Thu Oct 30 14:30:18 2008
@@ -1,4 +1,4 @@
-Config-JSON version 1.2.1
+Config-JSON version 1.3.0
 
 A JSON based config file parser/writer.
 

Modified: branches/upstream/libconfig-json-perl/current/lib/Config/JSON.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-json-perl/current/lib/Config/JSON.pm?rev=26372&op=diff
==============================================================================
--- branches/upstream/libconfig-json-perl/current/lib/Config/JSON.pm (original)
+++ branches/upstream/libconfig-json-perl/current/lib/Config/JSON.pm Thu Oct 30 14:30:18 2008
@@ -4,47 +4,41 @@
 use strict;
 use Carp;
 use Class::InsideOut qw(readonly id register private);
+use File::Copy;
+use File::Temp qw/ tempfile /;
 use JSON;
 use List::Util;
-use version; our $VERSION = qv('1.2.1');
+use version; our $VERSION = qv('1.3.0');
 
 
 use constant FILE_HEADER    => "# config-file-type: JSON 1\n";
 
 
 readonly    getFilePath     => my %filePath;    # path to config file
+readonly    isInclude       => my %isInclude;   # is an include file
 private     config          => my %config;      # in memory config file
-readonly    keyMapping      => my %keyMapping;  # key <-> file mapping for includes
-private     duplicates      => my %duplicates;  # keep track of duplicates for deleting
+readonly    getIncludes     => my %includes;    # keeps track of any included config files
 
 #-------------------------------------------------------------------
 sub addToArray {
-    my $self = shift;
-    my $property = shift;
-    my $value = shift;
+    my ($self, $property, $value) = @_;
     my $array = $self->get($property);
     unless (defined List::Util::first { $value eq $_ } @{$array}) { # check if it already exists
-        # add it
-        push(@{$array}, $value);
-        $self->set($property, $array);
-    }
-}
-
+		# add it
+      	push(@{$array}, $value);
+      	$self->set($property, $array);
+	}
+}
 
 #-------------------------------------------------------------------
 sub addToHash {
-    my $self = shift;
-    my $property = shift;
-    my $key = shift;
-    my $value = shift;
+    my ($self, $property, $key, $value) = @_;
     $self->set($property."/".$key, $value);
 }
 
-
 #-------------------------------------------------------------------
 sub create {
-    my $class = shift;
-    my $filename = shift;
+	my ($class, $filename) = @_;
     if (open(my $FILE,">",$filename)) {
         print $FILE FILE_HEADER."\n{ }\n";
         close($FILE);
@@ -52,77 +46,38 @@
     else {
         carp "Can't write to config file ".$filename;
     }
-    return $class->new($filename);
-}
-
-
+	return $class->new($filename);	
+}
 
 #-------------------------------------------------------------------
 sub delete {
-    my $self = shift;
-    my $param = shift;
+    my ($self, $param) = @_;
+	
+	# inform the includes
+	foreach my $include (@{$includes{id $self}}) {
+		$include->delete($param);
+	}
+	
+	# find the directive
+    my $directive   = $config{id $self};
     my @parts       = split "/", $param;
     my $lastPart    = pop @parts;
-
-    $self->_deleteDuplicates(@parts, $lastPart);
-    my $configFileToWrite = $self->_getIncludeFileToWrite($parts[0], $lastPart);
-    my $configHashRef = $self->_getConfigFileHashRef($configFileToWrite);
-    my $directive = $configHashRef;
-
-    my $inMemoryConfig = $config{ id $self };
-
-    if(@parts) {
-        foreach my $part ( @parts ) {
-            $directive = $directive->{$part};
-        }
+    foreach my $part (@parts) {
+        $directive = $directive->{$part};
     }
-    delete $directive->{$lastPart};
-    delete $inMemoryConfig->{$lastPart};
-
-    $self->_writeUpdatedConfigFile($configFileToWrite, $configHashRef);
-    $config{ id $self } = { %{ $inMemoryConfig }, %{ $configHashRef } };
-}
-
-#-------------------------------------------------------------------
-sub _deleteDuplicates {
-    my $self = shift;
-    my @parts = @_;
-    my $lastPart = pop @parts;
-
-    my $keyToDelete;
-    if ( my $duplicates = $duplicates{id $self} ) {
-        # can't just use $duplicates->{$lastPart} because that may not be where
-        # the duplicates start
-        $keyToDelete = List::Util::first { $duplicates->{$_} } (@parts, $lastPart);
-        foreach my $configFileToWrite ( @{ $duplicates->{$keyToDelete} } ) {
-            my $configHashRef = $self->_getConfigFileHashRef($configFileToWrite);
-            my $directive = $configHashRef;
-            if( @parts ) {
-                foreach my $part ( @parts ) {
-                    $directive = $directive->{$part};
-                }
-            }
-            delete $directive->{$lastPart};
-            $self->_writeUpdatedConfigFile($configFileToWrite, $configHashRef);
-        }
-        delete $duplicates->{$lastPart};
-        my $mapping = $keyMapping{id $self};
-        delete $mapping->{$keyToDelete};
-        $keyMapping{id $self} = $mapping;
-        $duplicates{id $self} = $duplicates;
-    }
-    else {
-        return;
-    }
+	
+	# only delete it if it exists
+	if (exists $directive->{$lastPart}) {
+		delete $directive->{$lastPart};
+		$self->write;
+	}
 }
 
 #-------------------------------------------------------------------
 sub deleteFromArray {
-    my $self = shift;
-    my $property = shift;
-    my $value = shift;
-    my $array = $self->get($property);
-    foreach (my $i = 0; $i < scalar(@{$array}); $i++) {
+    my ($self, $property, $value) = @_;
+    my $array	= $self->get($property);
+    for (my $i = 0; $i < scalar(@{$array}); $i++) {
         if ($array->[$i] eq $value) {
             splice(@{$array}, $i, 1);
             last;
@@ -131,38 +86,43 @@
     $self->set($property, $array);
 }
 
-
 #-------------------------------------------------------------------
 sub deleteFromHash {
-    my $self = shift;
-    my $property = shift;
-    my $key = shift;
+    my ($self, $property, $key) = @_;
     $self->delete($property."/".$key);
 }
 
-
 #-------------------------------------------------------------------
 sub get {
-    my $self        = shift;
-    my $property    = shift;
-    my $value       = $config{id $self};
-    foreach my $part (split "/", $property) {
-        $value = $value->{$part};
-    }
-    return $value;
-}
-
-#-------------------------------------------------------------------
-sub _getConfigFileHashRef {
-    my $self = shift;
-    my $configFileToWrite = shift;
-    open my $fh, '<', $configFileToWrite or carp "Cannot open config file for updating: " . $configFileToWrite;
-    my $json = do {
-        local $/;
-        <$fh>;
-    };
-    close $fh;
-    return JSON->new->relaxed(1)->decode($json);
+    my ($self, $property) = @_;
+
+	# they want a specific property
+	if (defined $property) {
+
+		# look in this config
+		my $value = $config{id $self};
+		foreach my $part (split "/", $property) {
+			$value = $value->{$part};
+		}
+		return $value if (defined $value);
+
+		# look through includes
+		foreach my $include (@{$includes{id $self}}) {
+			my $value = $include->get($property);
+			return $value if (defined $value);
+		}
+
+		# didn't find it
+		return undef;
+	}
+	
+	# they want the whole properties list
+	my %whole = ();
+	foreach my $include (@{$includes{id $self}}) {
+		%whole = (%whole, %{$include->get});			
+	}
+	%whole = (%whole, %{$config{id $self}});
+	return \%whole;
 }
 
 #-------------------------------------------------------------------
@@ -173,35 +133,8 @@
 }
 
 #-------------------------------------------------------------------
-sub _getIncludeFileToWrite {
-    my $self = shift;
-    my $firstPart = shift;
-    my $lastPart = shift;
-    my $configFileToWrite;
-    # if we've got included files, search for the file where this key is defined
-    if( my $mapping = $keyMapping{ id $self } ) {
-
-        # for top-level sets, $parts[0] will be undefined. use $lastPart if that's the case.
-        my $keyToWrite = defined $firstPart ? $firstPart : $lastPart;
-
-        # the key already exists in a file; write it there
-        if( my $configFileWithKey = $mapping->{ $keyToWrite } ) { 
-            $configFileToWrite = $configFileWithKey;
-        }
-    }
-
-    # if we haven't found the file to write to (the key is new), write to the
-    # main file.
-    if(!defined $configFileToWrite) {
-        $configFileToWrite = $self->getFilePath;
-    }
-    return $configFileToWrite;
-}
-
-#-------------------------------------------------------------------
 sub new {
-    my $class = shift;
-    my $pathToFile = shift;
+    my ($class, $pathToFile, $options) = @_;
     if (open(my $FILE, "<", $pathToFile)) {
         # slurp
         local $/ = undef;
@@ -212,17 +145,18 @@
             $conf = JSON->new->relaxed(1)->decode($json);
         };
         croak "Couldn't parse JSON in config file '$pathToFile'\n" unless ref $conf;
-        my $self = register($class);
-        $filePath{id $self} = $pathToFile;
-        $config{id $self}   = $conf;
-        if( $conf->{includes} ) {
-            my $keysInMainConfig;
-            foreach my $key ( keys %{ $conf } ) {
-                $keysInMainConfig->{$key} = $pathToFile;
-            }
-            $keyMapping{id $self} = $keysInMainConfig;
-            $self->_processIncludeFiles;
-        }
+        my $self 		= register($class);
+		my $id 			= id $self;
+        $filePath{$id} 	= $pathToFile;
+        $config{$id}   	= $conf;
+        $isInclude{$id} = $options->{isInclude};
+		
+		# process includes
+		my @includes = map { glob $_ } @{ $self->get('includes') || [] };
+		foreach my $include (@includes) {
+			push @{$includes{$id}},  $class->new($include, {isInclude=>1});
+		}
+		
         return $self;
     } 
     else {
@@ -231,111 +165,79 @@
 }
 
 #-------------------------------------------------------------------
-# combine multiple include files into a single data structure. carps for
-# duplicate keys, croaks on being unable to load an include for whatever reason
-sub _processIncludeFiles {
-    my $self = shift;
-    my $includes = $self->get('includes');
-
-    # handle wildcards
-    my @includes = map { glob $_ } @{ $includes };
-
-    my $duplicates = {};
-    foreach my $include ( @includes ) {
-        if( open my $FILE, '<', $include ) {
-            local $/ = undef;
-            my $json = <$FILE>;
-            close $FILE;
-            my $includeConf;
-            eval {
-                $includeConf = JSON->new->relaxed(1)->decode($json)
-            };
-            croak "Couldn't parse JSON in include file '$include'\n" unless ref $includeConf;
-            my $keyMapping = $keyMapping{id $self};
-            foreach my $key ( keys %{ $includeConf } ) {
-                # let the user know if there are duplicates
-                if( exists $keyMapping->{$key} ) {
-                    unless( exists $duplicates->{$key} ) {
-                        $duplicates->{$key} = [];
-                    }
-                    carp "Key $key already exists in configuration, defined in " . $keyMapping->{$key};
-                    push @{ $duplicates->{$key} }, $include;
-                }
-                # ... but don't fail outright
-                $keyMapping->{$key} = $include;
-            }
-            my $oldConf = $config{id $self};
-            my $newConf = { %{ $oldConf }, %{ $includeConf } };
-            $config{id $self} = $newConf;
-        }
-        else {
-            croak "Cannot read include file: " . $include;
-        }
-    }
-    $duplicates{id $self} = $duplicates;
-}
-
-#-------------------------------------------------------------------
 sub set {
-    my $self        = shift;
-    my $property    = shift;
-    my $value       = shift;
-
-    my @parts       = split "/", $property;
-    my $lastPart    = pop @parts;
-
-    my $configFileToWrite = $self->_getIncludeFileToWrite($parts[0], $lastPart);
-
-    # read the file to write and then do the writing. must use raw json because
-    # we can't read in the main file with config::json: it would process the
-    # includes and we'd write a single monolithic file; not what we want!
-
-    my $configHashRef = $self->_getConfigFileHashRef($configFileToWrite);
-    my $directive = $configHashRef;
-
-    # now, what we need to do is walk through the data structure, and get to
-    # the point that we're changing. if it's a top level set, @parts will be
-    # empty, so just use $lastPart.
-    # need to set the value in the in-memory config since we didn't use the API to do the write
-    my $inMemoryConfig = $config{ id $self };
-    if(@parts) {
-        foreach my $part ( @parts ) {
-            unless ( exists $inMemoryConfig->{$part} ) {
-                $directive->{$part} = $inMemoryConfig->{$part} = {};
-            }
-            $directive = $directive->{$part};
-        }
-    }
-
-    # finally, assign the value, and write it to disk
-    $directive->{$lastPart} = $value;
-
-    $self->_writeUpdatedConfigFile($configFileToWrite, $configHashRef);
-
-    # update the in-memory configuration since we wrote raw JSON
-    $config{ id $self } = { %{ $inMemoryConfig }, %{ $configHashRef } };
-}
-
-#-------------------------------------------------------------------
-sub _writeUpdatedConfigFile {
-    my $self = shift;
-    my $configFileToWrite = shift;
-    my $configHashRef = shift;
-
-    my $json = JSON->new->pretty->encode($configHashRef);
-    if (open(my $FILE, ">", $configFileToWrite)) {
+    my ($self, $property, $value) 	= @_;
+
+	# see if the directive exists in this config
+    my $directive	= $config{id $self};
+    my @parts 		= split "/", $property;
+	my $numParts 	= scalar @parts;
+	for (my $i=0; $i < $numParts; $i++) {
+		my $part = $parts[$i];
+		if (exists $directive->{$part}) { # exists so we continue
+			if ($i == $numParts - 1) { # we're on the last part
+				$directive->{$part} = $value;
+				$self->write;
+				return 1;
+			}
+			else {
+				$directive = $directive->{$part};
+			}
+		}
+		else { # doesn't exist so we quit
+			last;
+		}
+	}
+
+	# see if any of the includes have this directive
+	foreach my $include (@{$includes{id $self}}) {
+		my $found = $include->set($property, $value);
+		return 1 if ($found);
+	}
+
+	# let's create the directive new in this config if it's not an include
+	unless ($self->isInclude) {
+		$directive	= $config{id $self};
+		my $lastPart = pop @parts;
+		foreach my $part (@parts) {
+			unless (exists $directive->{$part}) {
+				$directive->{$part} = {};
+			}
+			$directive = $directive->{$part};
+		}
+	    $directive->{$lastPart} = $value;
+		$self->write;
+		return 1;
+	}
+
+	# didn't find a place to write it	
+	return 0;
+}
+
+#-------------------------------------------------------------------
+sub write {
+	my $self = shift;
+	my $realfile = $self->getFilePath;
+
+	# convert data to json
+    my $json = JSON->new->pretty->encode($config{id $self});
+
+	# create a temporary config file
+	my ($fh, $tempfile) = tempfile();
+	close($fh);
+    if (open(my $FILE,">", $tempfile)) {
         print $FILE FILE_HEADER."\n".$json;
         close($FILE);
     } 
     else {
-        carp "Can't write to config file ".$self->getFilePath;
+        croak "Can't write (".$realfile.") to temporary file (".$tempfile.")";
     }
-}
-
-sub dump {
-    my $self = shift;
-    return $config{id $self};
-}
+	
+	# move the temp file over the top of the existing file
+	copy($tempfile, $realfile) or croak "Can't copy temporary file (".$tempfile.") to config file (".$realfile.")";
+	unlink $tempfile or carp "Can't delete temporary config file (".$tempfile.")";
+}
+
 
 1; # Magic true value required at end of module
 __END__
@@ -347,7 +249,7 @@
 
 =head1 VERSION
 
-This document describes Config::JSON version 1.2.1
+This document describes Config::JSON version 1.3.0
 
 
 =head1 SYNOPSIS
@@ -362,11 +264,11 @@
  $config->set($directive,$value);
 
  $config->delete($directive);
- $config->deleteFromHash($name, $key);
- $config->deleteFromArray($name, $value);
-
- $config->addToHash($name, $key, $value);
- $config->addToArray($name, $value);
+ $config->deleteFromHash($directive, $key);
+ $config->deleteFromArray($directive, $value);
+
+ $config->addToHash($directive, $key, $value);
+ $config->addToArray($directive, $value);
 
  my $path = $config->getFilePath;
  my $filename = $config->getFilename;
@@ -374,7 +276,6 @@
 =head2 Example Config File
 
  # config-file-type: JSON 1
-
  {
         "dsn" : "DBI:mysql:test",
         "user" : "tester",
@@ -388,12 +289,9 @@
                 "health" : 32,
                 "vitality" : 11
         },
-
-        # include some other files. wildcards are expanded with glob
-        "includes": [
-            "firstInclude.conf",
-            "*.include.conf",
-        ]
+		
+		# including another file
+		"includes" : ["macros.conf"]
  } 
 
 
@@ -403,9 +301,11 @@
 
 If you want to see it in action, it is used as the config file system in WebGUI L<http://www.webgui.org/>.
 
+
 =head2 Why?
 
 Why build yet another config file system? Well there are a number of reasons: We used to use other config file parsers, but we kept running into limitations. We already use JSON in our app, so using JSON to store config files means using less memory because we already have the JSON parser in memory. In addition, with JSON we can have any number of hierarchcal data structures represented in the config file, whereas most config files will give you only one level of hierarchy, if any at all. JSON parses faster than XML and YAML. JSON is easier to read and edit than XML. Many other config file systems allow you to read a config file, but they don't provide any mechanism or utilities to write back to it. JSON is taint safe. JSON is easily parsed by languages other than Perl when we need to do that.
+
 
 =head2 Multi-level Directives
 
@@ -418,13 +318,24 @@
 
 You may do this wherever you specify a directive name.
 
-=head2 Including files
-
-You may specify a list of files to include using the C<includes> directive. All files will be checked for shell globs and expanded appropriately. Config::JSON will emit a warning for each duplicate key found.
 
 =head2 Comments
 
 You can put comments in the config file as long as # is the first non-space character on the line. However, if you use this API to write to the config file, your comments will be eliminated.
+
+
+=head2 Includes
+
+There is a special directive called "includes", which is an array of include files that may be brought in to
+the config. Even the files you include can have an "includes" directive, so you can do hierarchical includes.
+
+Any directive in the main file will take precedence over the directives in the includes. Likewise the files
+listed first in the "includes" directive will have precedence over the files that come after it. When writing
+to the files, the same precedence is followed.
+
+If you're setting a new directive that doesn't currently exist, it will only be written to the main file.
+
+If a directive is deleted, it will be deleted from all files, including the includes.
 
 =head1 INTERFACE 
 
@@ -529,6 +440,12 @@
 
 
 
+=head2 getIncludes ( )
+
+Returns an array reference of Config::JSON objects that are files included by this config.
+
+
+
 =head2 new ( pathToFile )
 
 Constructor. Builds an object around a config file.
@@ -552,6 +469,10 @@
 The value to set the paraemter to. Can be a scalar, hash reference, or array reference.
 
 
+
+=head2 write ( )
+
+Writes the file to the filesystem. Normally you'd never need to call this as it's called automatically by the other methods when a change occurs.
 
 
 
@@ -614,11 +535,9 @@
 L<http://rt.cpan.org>.
 
 
-=head1 AUTHORS
+=head1 AUTHOR
 
 JT Smith  C<< <jt-at-plainblack-dot-com> >>
-
-Chris Nehren C<< <chris-at-plainblack-dot-com> >>
 
 
 =head1 LICENCE AND COPYRIGHT

Modified: branches/upstream/libconfig-json-perl/current/t/00.load.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-json-perl/current/t/00.load.t?rev=26372&op=diff
==============================================================================
--- branches/upstream/libconfig-json-perl/current/t/00.load.t (original)
+++ branches/upstream/libconfig-json-perl/current/t/00.load.t Thu Oct 30 14:30:18 2008
@@ -1,5 +1,5 @@
 use Test::More tests => 1;
-use blib;
+use lib '../lib';
 
 use_ok( 'Config::JSON' );
 

Modified: branches/upstream/libconfig-json-perl/current/t/Config.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-json-perl/current/t/Config.t?rev=26372&op=diff
==============================================================================
--- branches/upstream/libconfig-json-perl/current/t/Config.t (original)
+++ branches/upstream/libconfig-json-perl/current/t/Config.t Thu Oct 30 14:30:18 2008
@@ -1,6 +1,6 @@
 use Test::More tests => 26;
 
-use blib;
+use lib '../lib';
 use Test::Deep;
 use Config::JSON;
 use File::Temp qw/ tempfile /;

Modified: branches/upstream/libconfig-json-perl/current/t/Duplicate.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-json-perl/current/t/Duplicate.t?rev=26372&op=diff
==============================================================================
--- branches/upstream/libconfig-json-perl/current/t/Duplicate.t (original)
+++ branches/upstream/libconfig-json-perl/current/t/Duplicate.t Thu Oct 30 14:30:18 2008
@@ -2,7 +2,6 @@
 use warnings;
 use Test::More tests => 22;
 
-#use blib;
 use lib '../lib';
 use Test::Deep;
 use Config::JSON;

Modified: branches/upstream/libconfig-json-perl/current/t/Include.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-json-perl/current/t/Include.t?rev=26372&op=diff
==============================================================================
--- branches/upstream/libconfig-json-perl/current/t/Include.t (original)
+++ branches/upstream/libconfig-json-perl/current/t/Include.t Thu Oct 30 14:30:18 2008
@@ -2,7 +2,7 @@
 use warnings;
 use Test::More tests => 55;
 
-use blib;
+use lib '../lib';
 use Test::Deep;
 use Config::JSON;
 use File::Temp qw/ tempfile /;
@@ -21,7 +21,7 @@
 # set up main config file with include section
 if (open(my $file, ">", $mainConfigFile)) {
     my $testData = <<END;
-
+# config-file-type: JSON 1
 {
     "dsn" : "DBI:mysql:test",
     "user" : "tester",

Modified: branches/upstream/libconfig-json-perl/current/t/Wildcard.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-json-perl/current/t/Wildcard.t?rev=26372&op=diff
==============================================================================
--- branches/upstream/libconfig-json-perl/current/t/Wildcard.t (original)
+++ branches/upstream/libconfig-json-perl/current/t/Wildcard.t Thu Oct 30 14:30:18 2008
@@ -2,7 +2,7 @@
 use warnings;
 use Test::More tests => 12;
 
-use blib;
+use lib '../lib';
 use Test::Deep;
 use Config::JSON;
 use File::Temp qw/ tempfile /;




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