r42713 - in /branches/upstream/libconfig-inifiles-perl/current: ./ lib/Config/ t/
jawnsy-guest at users.alioth.debian.org
jawnsy-guest at users.alioth.debian.org
Tue Aug 25 01:30:32 UTC 2009
Author: jawnsy-guest
Date: Tue Aug 25 01:30:25 2009
New Revision: 42713
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=42713
Log:
[svn-upgrade] Integrating new upstream version, libconfig-inifiles-perl (2.52)
Added:
branches/upstream/libconfig-inifiles-perl/current/t/24case-sensitive-exists.t
branches/upstream/libconfig-inifiles-perl/current/t/case-sensitive.ini
Modified:
branches/upstream/libconfig-inifiles-perl/current/Build.PL
branches/upstream/libconfig-inifiles-perl/current/Changes
branches/upstream/libconfig-inifiles-perl/current/MANIFEST
branches/upstream/libconfig-inifiles-perl/current/META.yml
branches/upstream/libconfig-inifiles-perl/current/Makefile.PL
branches/upstream/libconfig-inifiles-perl/current/lib/Config/IniFiles.pm
branches/upstream/libconfig-inifiles-perl/current/t/00load.t
branches/upstream/libconfig-inifiles-perl/current/t/01basic.t
branches/upstream/libconfig-inifiles-perl/current/t/02weird.t
branches/upstream/libconfig-inifiles-perl/current/t/04import.t
branches/upstream/libconfig-inifiles-perl/current/t/05hash.t
branches/upstream/libconfig-inifiles-perl/current/t/06oo.t
branches/upstream/libconfig-inifiles-perl/current/t/07misc.t
branches/upstream/libconfig-inifiles-perl/current/t/08group.t
branches/upstream/libconfig-inifiles-perl/current/t/09case.t
branches/upstream/libconfig-inifiles-perl/current/t/10delta.t
Modified: branches/upstream/libconfig-inifiles-perl/current/Build.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-inifiles-perl/current/Build.PL?rev=42713&op=diff
==============================================================================
--- branches/upstream/libconfig-inifiles-perl/current/Build.PL (original)
+++ branches/upstream/libconfig-inifiles-perl/current/Build.PL Tue Aug 25 01:30:25 2009
@@ -9,6 +9,8 @@
my $builder = Test::Run::Builder->new(
'module_name' => "Config::IniFiles",
+ 'license' => "perl",
+ dist_author => 'Shlomi Fish <shlomif at iglu.org.il>',
'build_requires' =>
{
'File::Spec' => 0,
@@ -21,7 +23,27 @@
'Symbol' => 0,
'warnings' => 0,
},
- 'license' => "perl",
+ create_makefile_pl => 'traditional',
+ meta_merge =>
+ {
+ resources =>
+ {
+ repository => "http://config-inifiles.svn.sourceforge.net/svnroot/config-inifiles/",
+ homepage => "https://sourceforge.net/projects/config-inifiles/",
+ },
+ keywords =>
+ [
+ "ini",
+ "files",
+ "config",
+ "configuration",
+ "ini files",
+ "windows",
+ "tie",
+ "pure-perl",
+ "tested",
+ ],
+ },
);
$builder->create_build_script;
Modified: branches/upstream/libconfig-inifiles-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-inifiles-perl/current/Changes?rev=42713&op=diff
==============================================================================
--- branches/upstream/libconfig-inifiles-perl/current/Changes (original)
+++ branches/upstream/libconfig-inifiles-perl/current/Changes Tue Aug 25 01:30:25 2009
@@ -1,3 +1,20 @@
+Version 2.52: ( Sun Jun 28 16:16:09 IDT 2009 )
+------------------------------------------------
+
+* Added more keys to Build.PL (author, etc.)
+* Added resources and keywords to META.yml.
+* Converted t/00load.t to Test-More.
+* No longer chdir()-ing into "t" in t/00load.t
+* Got rid of the "new Config::IniFiles" syntax in the tests.
+- replaced with Config::IniFiles->new().
+- see "Perl Best Practices", "Programming Perl", 3rd Edition
+
+Version 2.51: ( Mon Jun 8 12:38:50 IDT 2009 )
+------------------------------------------------
+
+* Fixed "#46721: $config->exists() does not pay attention to -nocase => 1"
+- https://rt.cpan.org/Ticket/Display.html?id=46721
+
Version 2.50: ( Sun May 31 14:54:14 IDT 2009 )
------------------------------------------------
@@ -45,8 +62,8 @@
from t/lib where appropriate. See for example:
- http://www.nntp.perl.org/group/perl.cpan.testers/2009/01/msg3101788.html
-Version 2.46: ( Sat Jan 17 16:31:52 IST 2009 )
------------------------------------------------
+Version 2.46: ( Sat Jan 17 16:31:52 IST 2009 )
+------------------------------------------------
* Added regression tests for bug #1720915
- https://sourceforge.net/tracker/index.php?func=detail&aid=1720915&group_id=6926&atid=106926
@@ -72,8 +89,8 @@
by newlines). It was documented and tested.
- https://rt.cpan.org/Ticket/Display.html?id=8612
-Version 2.45: ( Sat Dec 27 17:21:45 IST 2008 )
------------------------------------------------
+Version 2.45: ( Sat Dec 27 17:21:45 IST 2008 )
+------------------------------------------------
* Fixed bug #1230339:
- https://sourceforge.net/tracker/index.php?func=detail&aid=1230339&group_id=6926&atid=106926
@@ -92,15 +109,15 @@
- multiline-values are tainted.
- Added a test as t/17untainted-multiline-values.t
-Version 2.44: ( Thu Dec 25 11:44:07 IST 2008 )
------------------------------------------------
+Version 2.44: ( Thu Dec 25 11:44:07 IST 2008 )
+------------------------------------------------
* Eliminated an assignment of $VERSION into itself to "get rid of warnings".
Only caused warnings at Build.PL, and is unnecessary now that we
"use vars".
-Version 2.43: ( Thu Dec 4 18:56:02 IST 2008 )
------------------------------------------------
+Version 2.43: ( Thu Dec 4 18:56:02 IST 2008 )
+------------------------------------------------
* Placed IniFiles.pm under lib/Config/IniFiles.pm.
Modified: branches/upstream/libconfig-inifiles-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-inifiles-perl/current/MANIFEST?rev=42713&op=diff
==============================================================================
--- branches/upstream/libconfig-inifiles-perl/current/MANIFEST (original)
+++ branches/upstream/libconfig-inifiles-perl/current/MANIFEST Tue Aug 25 01:30:25 2009
@@ -30,6 +30,7 @@
t/20allowedcommentchars.t
t/22trailing-comment-lines.t
t/23scalar-ref.t
+t/24case-sensitive-exists.t
t/allowed-comment-chars.ini
t/array.ini
t/bad.ini
@@ -37,6 +38,7 @@
t/brackets-in-values.ini
t/ca.ini
t/case-sensitive-default.ini
+t/case-sensitive.ini
t/cmt.ini
t/en.ini
t/es.ini
Modified: branches/upstream/libconfig-inifiles-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-inifiles-perl/current/META.yml?rev=42713&op=diff
==============================================================================
--- branches/upstream/libconfig-inifiles-perl/current/META.yml (original)
+++ branches/upstream/libconfig-inifiles-perl/current/META.yml Tue Aug 25 01:30:25 2009
@@ -1,11 +1,14 @@
---
name: Config-IniFiles
-version: 2.50
-author: []
+version: 2.52
+author:
+ - 'Shlomi Fish <shlomif at iglu.org.il>'
abstract: A module for reading .ini-style configuration files.
license: perl
resources:
+ homepage: https://sourceforge.net/projects/config-inifiles/
license: http://dev.perl.org/licenses/
+ repository: http://config-inifiles.svn.sourceforge.net/svnroot/config-inifiles/
requires:
Carp: 0
Symbol: 0
@@ -17,8 +20,18 @@
provides:
Config::IniFiles:
file: lib/Config/IniFiles.pm
- version: 2.50
+ version: 2.52
generated_by: Module::Build version 0.33
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: 1.4
+keywords:
+ - ini
+ - files
+ - config
+ - configuration
+ - ini files
+ - windows
+ - tie
+ - pure-perl
+ - tested
Modified: branches/upstream/libconfig-inifiles-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-inifiles-perl/current/Makefile.PL?rev=42713&op=diff
==============================================================================
--- branches/upstream/libconfig-inifiles-perl/current/Makefile.PL (original)
+++ branches/upstream/libconfig-inifiles-perl/current/Makefile.PL Tue Aug 25 01:30:25 2009
@@ -1,10 +1,19 @@
+# Note: this file was auto-generated by Module::Build::Compat version 0.33
use ExtUtils::MakeMaker;
-# See lib/ExtUtils/MakeMaker.pm for details of how to influence
-# the contents of the Makefile that is written.
-WriteMakefile(
- 'NAME' => 'Config::IniFiles',
- 'VERSION_FROM' => 'lib/Config/IniFiles.pm', # finds $VERSION
- 'PL_FILES' =>
- {
- },
-);
+WriteMakefile
+(
+ 'NAME' => 'Config::IniFiles',
+ 'VERSION_FROM' => 'lib/Config/IniFiles.pm',
+ 'PREREQ_PM' => {
+ 'Carp' => 0,
+ 'File::Spec' => 0,
+ 'Scalar::Util' => 0,
+ 'Symbol' => 0,
+ 'strict' => 0,
+ 'warnings' => 0
+ },
+ 'INSTALLDIRS' => 'site',
+ 'EXE_FILES' => [],
+ 'PL_FILES' => {}
+ )
+;
Modified: branches/upstream/libconfig-inifiles-perl/current/lib/Config/IniFiles.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-inifiles-perl/current/lib/Config/IniFiles.pm?rev=42713&op=diff
==============================================================================
--- branches/upstream/libconfig-inifiles-perl/current/lib/Config/IniFiles.pm (original)
+++ branches/upstream/libconfig-inifiles-perl/current/lib/Config/IniFiles.pm Tue Aug 25 01:30:25 2009
@@ -2,7 +2,7 @@
use vars qw($VERSION);
-$VERSION = "2.50";
+$VERSION = "2.52";
require 5.004;
use strict;
@@ -456,6 +456,12 @@
sub exists {
my ($self, $sect, $parm)=@_;
+
+ if ($self->{nocase}) {
+ $sect = lc($sect);
+ $parm = lc($parm);
+ }
+
return (exists $self->{v}{$sect}{$parm});
}
Modified: branches/upstream/libconfig-inifiles-perl/current/t/00load.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-inifiles-perl/current/t/00load.t?rev=42713&op=diff
==============================================================================
--- branches/upstream/libconfig-inifiles-perl/current/t/00load.t (original)
+++ branches/upstream/libconfig-inifiles-perl/current/t/00load.t Tue Aug 25 01:30:25 2009
@@ -1,15 +1,19 @@
use strict;
-use Test;
+use warnings;
-BEGIN { $| = 1; plan tests => 15 }
-use Config::IniFiles;
-my $loaded = 1;
-ok($loaded);
+# Should be 15
+use Test::More tests => 15;
+use File::Spec;
+
+use IO::File;
+
+BEGIN
+{
+ # TEST
+ use_ok ('Config::IniFiles');
+}
my $ini;
-
-# Get files from the 't' directory, portably
-chdir('t') if ( -d 't' );
# a simple filehandle, such as STDIN
#** If anyone can come up with a test for STDIN that would be great
@@ -18,139 +22,155 @@
# But it's only good on platforms that support redirection.
# use strict;
# use Config::IniFiles;
-# my $ini = new Config::IniFiles -file => STDIN;
+# my $ini = Config::IniFiles->new(-file => STDIN);
# exit $ini ? 0; 1
+sub fn
+{
+ my $filename = shift;
+
+ return File::Spec->catfile(File::Spec->curdir(), "t", $filename);
+}
+
local *CONFIG;
-# Test 2
+# TEST
# a filehandle glob, such as *CONFIG
-if( open( CONFIG, "test.ini" ) ) {
- $ini = new Config::IniFiles -file => *CONFIG;
- ok($ini);
+if( open( CONFIG, "<", fn("test.ini") ) ) {
+ $ini = Config::IniFiles->new(-file => *CONFIG);
+ ok ($ini, q{$ini was initialized});
close CONFIG;
} else {
- ok( 0 );
+ ok (0, "Could not open file");
}
-
-# Test 3
+
+# TEST
# a reference to a glob, such as \*CONFIG
-if( open( CONFIG, "test.ini" ) ) {
- $ini = new Config::IniFiles -file => \*CONFIG;
- ok($ini);
+if( open( CONFIG, "<", fn("test.ini") ) ) {
+ $ini = Config::IniFiles->new(-file => \*CONFIG);
+ ok ($ini, q{$ini was initialized with a reference to a glob.});
close CONFIG;
} else {
- ok( 0 );
+ ok( 0, q{could not open test.ini});
}
-# Test 4
# an IO::File object
-if( eval( "require IO::File" ) && (my $fh = new IO::File( "test.ini" )) ) {
- $ini = new Config::IniFiles -file => $fh;
- ok($ini);
+# TEST
+if( my $fh = IO::File->new( fn("test.ini") )) {
+ $ini = Config::IniFiles->new(-file => $fh);
+ ok ($ini, q{$ini was initialized with an IO::File reference.});
$fh->close;
} else {
- ok( 0 );
+ ok ( 0, "Could not open file" );
} # endif
-# Test 5
+# TEST
# Reread on an open handle
-if( open( CONFIG, "test.ini" ) ) {
- $ini = new Config::IniFiles -file => \*CONFIG;
- ok($ini && $ini->ReadConfig());
+if( open( CONFIG, "<", fn("test.ini") ) ) {
+ $ini = Config::IniFiles->new(-file => \*CONFIG);
+ ok (($ini && $ini->ReadConfig()), qq{ReadConfig() was successful});
close CONFIG;
} else {
- ok( 0 );
+ ok (0, "Could not open file" );
}
-# Test 6
-# Write to a new file name and write to it
-if( open( CONFIG, "test.ini" ) ) {
- $ini = new Config::IniFiles -file => \*CONFIG;
- $ini->SetFileName( 'test01.ini' );
+# TEST
+if( open( CONFIG, "<", fn("test.ini") ) ) {
+ $ini = Config::IniFiles->new(-file => \*CONFIG);
+ $ini->SetFileName( fn('test01.ini') );
$ini->RewriteConfig();
close CONFIG;
# Now test opening and re-write to the same handle
- chmod(0644, "test01.ini");
- if(! open( CONFIG, "+<test01.ini" ) ) {
- die "Could not open test01.ini read/write";
+ chmod(0644, fn("test01.ini"));
+ if(! open( CONFIG, "+<", fn("test01.ini" ) )) {
+ die "Could not open " . fn("test01.ini") . "read/write";
}
- $ini = new Config::IniFiles -file => \*CONFIG;
+ $ini = Config::IniFiles->new(-file => \*CONFIG);
my $badname = scalar(\*CONFIG);
# Have to use open/close because -e seems to be always true!
- ok( $ini && $ini->RewriteConfig() && !(open( I, $badname )&&close(I)) );
+ ok( $ini && $ini->RewriteConfig() && !(open( I, $badname ) && close(I)) ,
+ qq{Write to a new file name and write to it},
+ );
close CONFIG;
# In case it failed, remove the file
# (old behavior was to write to a file whose filename is the scalar value of the handle!)
unlink $badname;
} else {
-ok( 0 );
+ ok (0, "Could not open file");
} # end if
-
+# the pathname of a file
+$ini = Config::IniFiles->new(-file => fn("test.ini"));
+# TEST
+ok ($ini, q{Opening with -file works});
-
-# Test 7
-# the pathname of a file
-$ini = new Config::IniFiles -file => "test.ini";
-ok($ini);
-
-# Test 8
# A non-INI file should fail, but not throw warnings
local $@ = '';
my $ERRORS = '';
local $SIG{__WARN__} = sub { $ERRORS .= $_[0] };
-eval { $ini = new Config::IniFiles -file => "00load.t" };
-ok(!$@ && !$ERRORS && !defined($ini));
+eval { $ini = Config::IniFiles->new(-file => fn("00load.t")) };
+# TEST
+ok(
+ !$@ && !$ERRORS && !defined($ini),
+ "A non-INI file should fail, but not throw errors"
+);
+
+$@ = '';
+eval { $ini = Config::IniFiles->new(-file => \*DATA) };
+# TEST
+ok (!$@ && defined($ini),
+ "Read in the DATA file without errors"
+);
+
+# Try a file with utf-8 encoding (has a Byte-Order-Mark at the start)
+# TEST
+$ini = Config::IniFiles->new(-file => fn("en.ini"));
+ok ($ini,
+ "Try a file with utf-8 encoding (has a Byte-Order-Mark at the start)"
+);
-# Test 9
-# Read in the DATA file without errors
+# Create a new INI file, and set the name using SetFileName
+$ini = Config::IniFiles->new();
+my $filename = $ini->GetFileName;
+# TEST
+ok ((! defined($filename)),
+ "Not defined filename on fresh Config::IniFiles"
+);
+
+# TEST
+$ini->SetFileName(fn("test9_name.ini"));
+$filename = $ini->GetFileName;
+is(
+ $filename,
+ fn("test9_name.ini"),
+ "Check GetFileName method",
+);
+
$@ = '';
-eval { $ini = new Config::IniFiles -file => \*DATA };
-ok(!$@ && defined($ini));
+eval { $ini = Config::IniFiles->new(-file => fn('blank.ini')); };
+# TEST
+ok ((!$@ && !defined($ini)),
+ "Make sure that no warnings are thrown for an empty file",
+);
-# Test 10
-# Try a file with utf-8 encoding (has a Byte-Order-Mark at the start)
-$ini = new Config::IniFiles -file => "en.ini";
-ok($ini);
+$@ = '';
+eval { $ini = Config::IniFiles->new(-file => fn('blank.ini'), -allowempty=>1); };
+# TEST
+ok((!$@ && defined($ini)),
+ "Empty files should cause no rejection when appropriate switch set",
+);
-# Test 11
-# Create a new INI file, and set the name using SetFileName
-$ini = new Config::IniFiles;
-my $filename = $ini->GetFileName;
-ok(not defined($filename));
-
-# Test 12
-# Check GetFileName method
-$ini->SetFileName("test9_name.ini");
-$filename = $ini->GetFileName;
-ok($filename eq "test9_name.ini");
-
-# Test 13
-# Make sure that no warnings are thrown for an empty file
$@ = '';
-eval { $ini = new Config::IniFiles -file => 'blank.ini' };
-ok(!$@ && !defined($ini));
-
-# Test 14
-# Empty files should cause no rejection when appropriate switch set
-$@ = '';
-eval { $ini = new Config::IniFiles -file => 'blank.ini', -allowempty=>1 };
-ok(!$@ && defined($ini));
-
-
-# Test 15
-# A malformed file should throw an error message
-$@ = '';
-eval { $ini = new Config::IniFiles -file => 'bad.ini' };
-ok(!$@ && !defined($ini) && @Config::IniFiles::errors);
-
+eval { $ini = Config::IniFiles->new(-file => fn('bad.ini')); };
+# TEST
+ok((!$@ && !defined($ini) && @Config::IniFiles::errors),
+ "A malformed file should throw an error message",
+);
# Clean up when we're done
-unlink "test01.ini";
-
+unlink fn("test01.ini");
__END__
; File that has comments in the first line
Modified: branches/upstream/libconfig-inifiles-perl/current/t/01basic.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-inifiles-perl/current/t/01basic.t?rev=42713&op=diff
==============================================================================
--- branches/upstream/libconfig-inifiles-perl/current/t/01basic.t (original)
+++ branches/upstream/libconfig-inifiles-perl/current/t/01basic.t Tue Aug 25 01:30:25 2009
@@ -14,7 +14,7 @@
# Test 1
# Loading from a file
-my $ini = new Config::IniFiles -file => "test.ini";
+my $ini = Config::IniFiles->new(-file => "test.ini");
$ini->_assert_invariants();
unlink "test01.ini";
$ini->SetFileName("test01.ini");
Modified: branches/upstream/libconfig-inifiles-perl/current/t/02weird.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-inifiles-perl/current/t/02weird.t?rev=42713&op=diff
==============================================================================
--- branches/upstream/libconfig-inifiles-perl/current/t/02weird.t (original)
+++ branches/upstream/libconfig-inifiles-perl/current/t/02weird.t Tue Aug 25 01:30:25 2009
@@ -11,7 +11,7 @@
# Get files from the 't' directory, portably
chdir('t') if ( -d 't' );
-$ini = new Config::IniFiles -file => "test.ini";
+$ini = Config::IniFiles->new(-file => "test.ini");
$ini->_assert_invariants();
$ini->SetFileName("test02.ini");
$ini->SetWriteMode("0666");
Modified: branches/upstream/libconfig-inifiles-perl/current/t/04import.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-inifiles-perl/current/t/04import.t?rev=42713&op=diff
==============================================================================
--- branches/upstream/libconfig-inifiles-perl/current/t/04import.t (original)
+++ branches/upstream/libconfig-inifiles-perl/current/t/04import.t Tue Aug 25 01:30:25 2009
@@ -16,12 +16,12 @@
# test 1
# print "Import a file .................... ";
-my $en = new Config::IniFiles( -file => 'en.ini' );
+my $en = Config::IniFiles->new( -file => 'en.ini' );
ok( $en );
# test 2
my $es;
-ok( $es = new Config::IniFiles( -file => 'es.ini', -import => $en ) );
+ok( $es = Config::IniFiles->new( -file => 'es.ini', -import => $en ) );
# test 3
@@ -44,7 +44,7 @@
# test 4
# Import another level
-my $ca = new Config::IniFiles( -file => 'ca.ini', -import => $es );
+my $ca = Config::IniFiles->new( -file => 'ca.ini', -import => $es );
ok(
($en_sn eq $ca->val( 'x', 'ShortName' )) &&
($es_sn eq $ca->val( 'x', 'ShortName' )) &&
Modified: branches/upstream/libconfig-inifiles-perl/current/t/05hash.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-inifiles-perl/current/t/05hash.t?rev=42713&op=diff
==============================================================================
--- branches/upstream/libconfig-inifiles-perl/current/t/05hash.t (original)
+++ branches/upstream/libconfig-inifiles-perl/current/t/05hash.t Tue Aug 25 01:30:25 2009
@@ -61,7 +61,7 @@
# Test 9
# Listing section names using keys
$value = 1;
-$ini = new Config::IniFiles( -file => "test.ini", -default => 'test1', -nocase => 1 );
+$ini = Config::IniFiles->new( -file => "test.ini", -default => 'test1', -nocase => 1 );
$ini->SetFileName("test05b.ini");
my @S1 = $ini->Sections;
my @S2 = keys %ini;
Modified: branches/upstream/libconfig-inifiles-perl/current/t/06oo.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-inifiles-perl/current/t/06oo.t?rev=42713&op=diff
==============================================================================
--- branches/upstream/libconfig-inifiles-perl/current/t/06oo.t (original)
+++ branches/upstream/libconfig-inifiles-perl/current/t/06oo.t Tue Aug 25 01:30:25 2009
@@ -11,12 +11,12 @@
# test 1
# print "Empty list when no groups ........ ";
-$en = new Config::IniFiles( -file => 'en.ini' );
+$en = Config::IniFiles->new( -file => 'en.ini' );
ok( scalar($en->Groups) == 0 );
# test 2
# print "Creating new object, no file ..... ";
-ok($ini = new Config::IniFiles);
+ok($ini = Config::IniFiles->new);
# test 3
# print "Setting new file name .............";
Modified: branches/upstream/libconfig-inifiles-perl/current/t/07misc.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-inifiles-perl/current/t/07misc.t?rev=42713&op=diff
==============================================================================
--- branches/upstream/libconfig-inifiles-perl/current/t/07misc.t (original)
+++ branches/upstream/libconfig-inifiles-perl/current/t/07misc.t Tue Aug 25 01:30:25 2009
@@ -12,7 +12,7 @@
# Test 1
# Multiple equals in a parameter - should split on the first
-$ini = new Config::IniFiles( -file => 'test.ini' );
+$ini = Config::IniFiles->new( -file => 'test.ini' );
$value = $ini->val('test7', 'criterion') || '';
ok($value eq 'price <= maximum');
@@ -23,7 +23,7 @@
# test 3
# See if default option works
-$ini = new Config::IniFiles( -file => "test.ini", -default => 'test1', -nocase => 1 );
+$ini = Config::IniFiles->new( -file => "test.ini", -default => 'test1', -nocase => 1 );
$ini->SetFileName("test07.ini");
$ini->SetWriteMode("0666");
ok( (defined $ini) && ($ini->val('test2', 'three') eq 'value3') );
Modified: branches/upstream/libconfig-inifiles-perl/current/t/08group.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-inifiles-perl/current/t/08group.t?rev=42713&op=diff
==============================================================================
--- branches/upstream/libconfig-inifiles-perl/current/t/08group.t (original)
+++ branches/upstream/libconfig-inifiles-perl/current/t/08group.t Tue Aug 25 01:30:25 2009
@@ -8,7 +8,7 @@
# Get files from the 't' directory, portably
chdir('t') if ( -d 't' );
-my $ini = new Config::IniFiles( -file => 'test.ini' );
+my $ini = Config::IniFiles->new( -file => 'test.ini' );
my $members;
# Test 1
Modified: branches/upstream/libconfig-inifiles-perl/current/t/09case.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-inifiles-perl/current/t/09case.t?rev=42713&op=diff
==============================================================================
--- branches/upstream/libconfig-inifiles-perl/current/t/09case.t (original)
+++ branches/upstream/libconfig-inifiles-perl/current/t/09case.t Tue Aug 25 01:30:25 2009
@@ -16,7 +16,7 @@
# Test 1
# newval and val - Check that correct case brings back the correct value
-$ini = new Config::IniFiles;
+$ini = Config::IniFiles->new;
$ini->newval("Section", "PaRaMeTeR", "Mixed Case");
$ini->newval("Section", "Parameter", "Title Case");
my $mixed_case = $ini->val("Section", "PaRaMeTeR");
@@ -26,7 +26,7 @@
# Test 2
# Sections
# Set up a controlled environment
-$ini = new Config::IniFiles;
+$ini = Config::IniFiles->new;
$ini->newval("Section", "Parameter", "Value");
$ini->newval("section", "parameter", "value");
my $section_case_check_pass = 1;
@@ -36,7 +36,7 @@
# Test 3
# Deleting values
# Set up a controlled environment
-$ini = new Config::IniFiles;
+$ini = Config::IniFiles->new;
$ini->newval("Section", "Parameter", "Title Case");
$ini->newval("Section", "parameter", "lower case");
$ini->newval("Section", "PARAMETER", "UPPER CASE");
@@ -52,7 +52,7 @@
# Test 4
# Parameters
-$ini = new Config::IniFiles;
+$ini = Config::IniFiles->new;
$ini->newval("Section", "PaRaMeTeR", "Mixed Case");
$ini->newval("Section", "Parameter", "Title Case");
$ini->newval("SECTION", "Parameter", "N/A");
@@ -70,7 +70,7 @@
# Test 5
# Case sensitive handling of groups
# Set up a controlled environment
-$ini = new Config::IniFiles;
+$ini = Config::IniFiles->new;
$ini->newval("interface foo", "parameter", "foo");
$ini->newval("interface bar", "parameter", "bar");
$ini->newval("INTERFACE blurgle", "parameter", "flurgle");
@@ -94,7 +94,7 @@
# Test 6
# newval - Check that case-insensitive version returns one value
-$ini = new Config::IniFiles( -nocase => "1" );
+$ini = Config::IniFiles->new( -nocase => "1" );
$ini->newval("Section", "PaRaMeTeR", "Mixed Case");
$ini->newval("Section", "Parameter", "Title Case");
my @values = $ini->val("Section", "parameter");
@@ -102,11 +102,11 @@
# Test 7
# Case insensitive handling of groups
-$ini = new Config::IniFiles( -file =>'test.ini', -nocase => 1 );
+$ini = Config::IniFiles->new( -file =>'test.ini', -nocase => 1 );
$string = join " ", $ini->GroupMembers("GrOuP");
ok($string eq "group member one group member two group member three");
-$ini = new Config::IniFiles( -file => "test.ini", -default => 'test1', -nocase => 1 );
+$ini = Config::IniFiles->new( -file => "test.ini", -default => 'test1', -nocase => 1 );
$ini->SetFileName("test09.ini");
# test 8
Modified: branches/upstream/libconfig-inifiles-perl/current/t/10delta.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-inifiles-perl/current/t/10delta.t?rev=42713&op=diff
==============================================================================
--- branches/upstream/libconfig-inifiles-perl/current/t/10delta.t (original)
+++ branches/upstream/libconfig-inifiles-perl/current/t/10delta.t Tue Aug 25 01:30:25 2009
@@ -24,12 +24,12 @@
# test 1
# print "Import a file .................... ";
-my $en = new Config::IniFiles( -file => 'en.ini' );
+my $en = Config::IniFiles->new( -file => 'en.ini' );
ok( $en );
# test 2
my $es;
-ok( $es = new Config::IniFiles( -file => 'es.ini', -import => $en ) );
+ok( $es = Config::IniFiles->new( -file => 'es.ini', -import => $en ) );
my $estext=slurp("es.ini"); $estext =~ s/\s*//g;
# test 3
@@ -61,7 +61,7 @@
# test 6
## Parsing back deletion marks
-$es=new Config::IniFiles( -file => 'delta.ini', -import => $en );
+$es=Config::IniFiles->new( -file => 'delta.ini', -import => $en );
ok((!defined $es->val("x", "LongName")) &&
(! $es->SectionExists("m")));
unlink("delta.ini");
Added: branches/upstream/libconfig-inifiles-perl/current/t/24case-sensitive-exists.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-inifiles-perl/current/t/24case-sensitive-exists.t?rev=42713&op=file
==============================================================================
--- branches/upstream/libconfig-inifiles-perl/current/t/24case-sensitive-exists.t (added)
+++ branches/upstream/libconfig-inifiles-perl/current/t/24case-sensitive-exists.t Tue Aug 25 01:30:25 2009
@@ -1,0 +1,35 @@
+#!/usr/bin/perl
+
+# This script attempts to reproduce:
+# https://rt.cpan.org/Ticket/Display.html?id=46721
+#
+# #46721: $config->exists() does not pay attention to -nocase => 1
+
+use Test::More tests => 2;
+
+use strict;
+use warnings;
+
+use File::Spec;
+
+use Config::IniFiles;
+
+{
+ my $conf = Config::IniFiles->new(
+ -file => File::Spec->catfile(File::Spec->curdir(),
+ 't', 'case-sensitive.ini'
+ ),
+ -nocase => 1
+ );
+
+ # TEST
+ ok (scalar($conf->exists('FOO', 'BAR')),
+ "->exists() Handles case well"
+ );
+
+ # TEST
+ is (scalar($conf->val('FOO', 'BAR')), "goodness",
+ "->val() Handles case well"
+ );
+}
+
Added: branches/upstream/libconfig-inifiles-perl/current/t/case-sensitive.ini
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-inifiles-perl/current/t/case-sensitive.ini?rev=42713&op=file
==============================================================================
--- branches/upstream/libconfig-inifiles-perl/current/t/case-sensitive.ini (added)
+++ branches/upstream/libconfig-inifiles-perl/current/t/case-sensitive.ini Tue Aug 25 01:30:25 2009
@@ -1,0 +1,3 @@
+[foo]
+bar = goodness
+
More information about the Pkg-perl-cvs-commits
mailing list