diff -Nru libconfig-inifiles-perl-2.79/Changes libconfig-inifiles-perl-2.82/Changes --- libconfig-inifiles-perl-2.79/Changes 2013-05-06 07:09:50.000000000 +0000 +++ libconfig-inifiles-perl-2.82/Changes 2013-05-21 15:33:29.000000000 +0000 @@ -1,3 +1,21 @@ +Version 2.82 ( Tue 21 May 18:32:23 IDT 2013 ) +------------------------------------------------ + +* Add t/style-trailing-space.t . + - Remove trailing space. + +Version 2.81 ( Thu 16 May 13:31:34 IDT 2013 ) +------------------------------------------------ + +* Add the CopySection method to copy a section. + - Thanks to James Rouzier. + +Version 2.80 ( Tue 14 May 22:22:55 IDT 2013 ) +------------------------------------------------ + +* Add the RenameSection method to rename a section. + - Thanks to James Rouzier. + Version 2.79 ( Mon 6 May 10:02:47 IDT 2013 ) ------------------------------------------------ diff -Nru libconfig-inifiles-perl-2.79/MANIFEST libconfig-inifiles-perl-2.82/MANIFEST --- libconfig-inifiles-perl-2.79/MANIFEST 2013-05-06 07:09:50.000000000 +0000 +++ libconfig-inifiles-perl-2.82/MANIFEST 2013-05-21 15:33:29.000000000 +0000 @@ -58,5 +58,6 @@ t/non-contiguous-groups.ini t/pod-coverage.t t/pod.t +t/style-trailing-space.t t/test.ini t/trailing-comments.ini diff -Nru libconfig-inifiles-perl-2.79/META.json libconfig-inifiles-perl-2.82/META.json --- libconfig-inifiles-perl-2.79/META.json 2013-05-06 07:09:50.000000000 +0000 +++ libconfig-inifiles-perl-2.82/META.json 2013-05-21 15:33:29.000000000 +0000 @@ -57,7 +57,7 @@ "provides" : { "Config::IniFiles" : { "file" : "lib/Config/IniFiles.pm", - "version" : "2.79" + "version" : "2.82" } }, "release_status" : "stable", @@ -70,5 +70,5 @@ "url" : "https://bitbucket.org/shlomif/perl-config-inifiles" } }, - "version" : "2.79" + "version" : "2.82" } diff -Nru libconfig-inifiles-perl-2.79/META.yml libconfig-inifiles-perl-2.82/META.yml --- libconfig-inifiles-perl-2.79/META.yml 2013-05-06 07:09:50.000000000 +0000 +++ libconfig-inifiles-perl-2.82/META.yml 2013-05-21 15:33:29.000000000 +0000 @@ -32,7 +32,7 @@ provides: Config::IniFiles: file: lib/Config/IniFiles.pm - version: 2.79 + version: 2.82 requires: Carp: 0 Fcntl: 0 @@ -46,4 +46,4 @@ homepage: https://sourceforge.net/projects/config-inifiles/ license: http://dev.perl.org/licenses/ repository: https://bitbucket.org/shlomif/perl-config-inifiles -version: 2.79 +version: 2.82 diff -Nru libconfig-inifiles-perl-2.79/README libconfig-inifiles-perl-2.82/README --- libconfig-inifiles-perl-2.79/README 2013-05-06 07:09:50.000000000 +0000 +++ libconfig-inifiles-perl-2.82/README 2013-05-21 15:33:29.000000000 +0000 @@ -30,6 +30,6 @@ LICENSE -This program is free software; you can redistribute it and/or +This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. diff -Nru libconfig-inifiles-perl-2.79/debian/changelog libconfig-inifiles-perl-2.82/debian/changelog --- libconfig-inifiles-perl-2.79/debian/changelog 2013-05-09 14:38:53.000000000 +0000 +++ libconfig-inifiles-perl-2.82/debian/changelog 2013-07-19 11:36:19.000000000 +0000 @@ -1,3 +1,19 @@ +libconfig-inifiles-perl (2.82-1) unstable; urgency=low + + [ upstream ] + * New release. + + Add the RenameSection method to rename a section. + + Add the CopySection method to copy a section. + + Add t/style-trailing-space.t. + + Remove trailing space. + + [ Jonas Smedegaard ] + * Switch to cpan.org/authors URL for watch file and get-orig-source + target, and simplify watch file. + * Rewrap long description at 72 chars, and strip trailing whitespace. + + -- Jonas Smedegaard Fri, 19 Jul 2013 13:34:28 +0200 + libconfig-inifiles-perl (2.79-1) unstable; urgency=low [ upstream ] diff -Nru libconfig-inifiles-perl-2.79/debian/control libconfig-inifiles-perl-2.82/debian/control --- libconfig-inifiles-perl-2.79/debian/control 2013-05-09 14:38:33.000000000 +0000 +++ libconfig-inifiles-perl-2.82/debian/control 2013-07-19 11:33:49.000000000 +0000 @@ -21,6 +21,7 @@ ${misc:Depends}, ${perl:Depends} Description: Read .ini-style configuration files - Config::IniFiles provides a way to have readable configuration files outside - your Perl script. Configurations can be imported (inherited, stacked,...), - sections can be grouped, and settings can be accessed from a tied hash. + Config::IniFiles provides a way to have readable configuration files + outside your Perl script. Configurations can be imported (inherited, + stacked,...), sections can be grouped, and settings can be accessed + from a tied hash. diff -Nru libconfig-inifiles-perl-2.79/debian/control.in libconfig-inifiles-perl-2.82/debian/control.in --- libconfig-inifiles-perl-2.79/debian/control.in 2013-05-09 14:00:22.000000000 +0000 +++ libconfig-inifiles-perl-2.82/debian/control.in 2013-07-19 11:30:53.000000000 +0000 @@ -15,6 +15,7 @@ ${misc:Depends}, ${perl:Depends} Description: Read .ini-style configuration files - Config::IniFiles provides a way to have readable configuration files outside - your Perl script. Configurations can be imported (inherited, stacked,...), - sections can be grouped, and settings can be accessed from a tied hash. + Config::IniFiles provides a way to have readable configuration files + outside your Perl script. Configurations can be imported (inherited, + stacked,...), sections can be grouped, and settings can be accessed + from a tied hash. diff -Nru libconfig-inifiles-perl-2.79/debian/copyright_hints libconfig-inifiles-perl-2.82/debian/copyright_hints --- libconfig-inifiles-perl-2.79/debian/copyright_hints 2013-05-09 14:35:51.000000000 +0000 +++ libconfig-inifiles-perl-2.82/debian/copyright_hints 2013-07-19 11:33:46.000000000 +0000 @@ -66,6 +66,7 @@ t/non-contiguous-groups.ini t/pod-coverage.t t/pod.t + t/style-trailing-space.t t/test.ini t/trailing-comments.ini Copyright: *No copyright* diff -Nru libconfig-inifiles-perl-2.79/debian/rules libconfig-inifiles-perl-2.82/debian/rules --- libconfig-inifiles-perl-2.79/debian/rules 2013-05-09 14:35:51.000000000 +0000 +++ libconfig-inifiles-perl-2.82/debian/rules 2013-07-19 11:21:04.000000000 +0000 @@ -23,9 +23,8 @@ include /usr/share/cdbs/1/rules/debhelper.mk DEB_UPSTREAM_PACKAGE = Config-IniFiles -#DEB_UPSTREAM_URL = http://www.cpan.org/modules/by-module/Config -DEB_UPSTREAM_URL = http://www.cpan.org/modules/by-module/Config/SHLOMIF -DEB_UPSTREAM_TARBALL_MD5 = fb31fa4ec1af06c41bbe4445329b3bf5 +DEB_UPSTREAM_URL = http://www.cpan.org/authors/id/S/SH/SHLOMIF +DEB_UPSTREAM_TARBALL_MD5 = e0e85657c64461a4e19a11b1862fd7ef pkg = $(DEB_SOURCE_PACKAGE) diff -Nru libconfig-inifiles-perl-2.79/debian/watch libconfig-inifiles-perl-2.82/debian/watch --- libconfig-inifiles-perl-2.79/debian/watch 2013-05-09 14:01:49.000000000 +0000 +++ libconfig-inifiles-perl-2.82/debian/watch 2013-07-19 11:21:13.000000000 +0000 @@ -1,3 +1,3 @@ # Run the "uscan" command to check for upstream updates and more. version=3 -http://search.cpan.org/dist/Config-IniFiles/ .*/Config-IniFiles-(\d[\d.]+)\.tar\.gz +http://www.cpan.org/authors/id/S/SH/SHLOMIF/Config-IniFiles-(\d[\d.]+)\.tar\.gz diff -Nru libconfig-inifiles-perl-2.79/inc/Test/Run/Builder.pm libconfig-inifiles-perl-2.82/inc/Test/Run/Builder.pm --- libconfig-inifiles-perl-2.79/inc/Test/Run/Builder.pm 2013-05-06 07:09:50.000000000 +0000 +++ libconfig-inifiles-perl-2.82/inc/Test/Run/Builder.pm 2013-05-21 15:33:29.000000000 +0000 @@ -54,7 +54,7 @@ Test::Run::CmdLine::Iface->new( { 'test_files' => [glob("t/*.t")], - } + } # 'backend_params' => $self->_get_backend_params(), ); @@ -64,7 +64,7 @@ sub ACTION_tags { my $self = shift; - return + return $self->do_system( "ctags", qw(-f tags --recurse --totals diff -Nru libconfig-inifiles-perl-2.79/lib/Config/IniFiles.pm libconfig-inifiles-perl-2.82/lib/Config/IniFiles.pm --- libconfig-inifiles-perl-2.79/lib/Config/IniFiles.pm 2013-05-06 07:09:50.000000000 +0000 +++ libconfig-inifiles-perl-2.82/lib/Config/IniFiles.pm 2013-05-21 15:33:29.000000000 +0000 @@ -2,7 +2,7 @@ use vars qw($VERSION); -$VERSION = '2.79'; +$VERSION = '2.82'; require 5.004; use strict; @@ -1453,6 +1453,61 @@ return 1; } # end DeleteSection +=head2 RenameSection ( $old_section_name, $new_section_name, $include_groupmembers) + +Renames a section if it does not already exists optionally including groupmembers + +=cut + +sub RenameSection { + my $self = shift; + my $old_sect = shift; + my $new_sect = shift; + my $include_groupmembers = shift; + return undef unless $self->CopySection($old_sect,$new_sect,$include_groupmembers); + return $self->DeleteSection($old_sect); + +} # end RenameSection + +=head2 CopySection ( $old_section_name, $new_section_name, $include_groupmembers) + +Copies one section to another optionally including groupmembers + +=cut + +sub CopySection { + my $self = shift; + my $old_sect = shift; + my $new_sect = shift; + my $include_groupmembers = shift; + + if (not defined $old_sect or + not defined $new_sect or + !$self->SectionExists($old_sect) or + $self->SectionExists($new_sect)) { + return undef; + } + + $self->_caseify(\$new_sect); + $self->_AddSection_Helper($new_sect); + + # This is done the fast way, change if data structure changes!! + foreach my $key (qw(v sCMT pCMT EOT parms myparms)) { + next unless exists $self->{$key}{$old_sect}; + $self->{$key}{$new_sect} = Config::IniFiles::_deepcopy($self->{$key}{$old_sect}); + } + + if($include_groupmembers) { + foreach my $old_groupmember ($self->GroupMembers($old_sect)) { + my $new_groupmember = $old_groupmember; + $new_groupmember =~ s/\A\Q$old_sect\E/$new_sect/; + $self->CopySection($old_groupmember,$new_groupmember); + } + } + + return 1; +} # end CopySection + =head2 Parameters ($sect_name) Returns an array containing the parameters contained in the specified diff -Nru libconfig-inifiles-perl-2.79/t/00load.t libconfig-inifiles-perl-2.82/t/00load.t --- libconfig-inifiles-perl-2.79/t/00load.t 2013-05-06 07:09:50.000000000 +0000 +++ libconfig-inifiles-perl-2.82/t/00load.t 2013-05-21 15:33:29.000000000 +0000 @@ -61,7 +61,7 @@ } # endif -# TEST +# TEST # Reread on an open handle if( open( CONFIG, "<", t_file("test.ini") ) ) { $ini = Config::IniFiles->new(-file => \*CONFIG); @@ -121,9 +121,9 @@ ); # Try a file with utf-8 encoding (has a Byte-Order-Mark at the start) -# TEST +# TEST $ini = Config::IniFiles->new(-file => t_file("en.ini")); -ok ($ini, +ok ($ini, "Try a file with utf-8 encoding (has a Byte-Order-Mark at the start)" ); @@ -171,7 +171,7 @@ __END__ ; File that has comments in the first line -; Comments are marked with ';'. +; Comments are marked with ';'. ; This should not fail when checking if the file is valid [section] parameter=value diff -Nru libconfig-inifiles-perl-2.79/t/01basic.t libconfig-inifiles-perl-2.82/t/01basic.t --- libconfig-inifiles-perl-2.79/t/01basic.t 2013-05-06 07:09:50.000000000 +0000 +++ libconfig-inifiles-perl-2.82/t/01basic.t 2013-05-21 15:33:29.000000000 +0000 @@ -39,7 +39,7 @@ $value = $ini->val('test1', 'mult'); # TEST -is ($value, "one$/two$/three", +is ($value, "one$/two$/three", "Reading a multiple value in scalar context" ); diff -Nru libconfig-inifiles-perl-2.79/t/02weird.t libconfig-inifiles-perl-2.82/t/02weird.t --- libconfig-inifiles-perl-2.79/t/02weird.t 2013-05-06 07:09:50.000000000 +0000 +++ libconfig-inifiles-perl-2.82/t/02weird.t 2013-05-21 15:33:29.000000000 +0000 @@ -46,13 +46,13 @@ # Test 3/4 # Make sure whitespace after parameter name is not included in name -# TEST +# TEST is( $ini->val( 'test7', 'criterion' ), 'price <= maximum' , "Make sure whitespace after parameter name is not included in name", ); # TEST -ok( +ok( ! defined $ini->val( 'test7', 'criterion ' ), "For criterion containing whitespace returns undef.", ); @@ -61,21 +61,21 @@ # Build a file from scratch with tied interface for testing my %test; # TEST -ok( (tie %test, 'Config::IniFiles'), "Tying is successful" ); -tied(%test)->SetFileName(t_file('test02.ini')); +ok( (tie %test, 'Config::IniFiles'), "Tying is successful" ); +tied(%test)->SetFileName(t_file('test02.ini')); # Test 6 # Also with pipes when using tied interface using vlaue of 0 -$test{'2'}={}; +$test{'2'}={}; tied(%test)->_assert_invariants(); -$test{'2'}{'test'}="sleep"; +$test{'2'}{'test'}="sleep"; tied(%test)->_assert_invariants(); -my $sectionheader="0|2"; -$test{$sectionheader}={}; +my $sectionheader="0|2"; +$test{$sectionheader}={}; tied(%test)->_assert_invariants(); $test{$sectionheader}{'vacation'}=0; tied(%test)->_assert_invariants(); -tied(%test)->RewriteConfig(); +tied(%test)->RewriteConfig(); tied(%test)->ReadConfig; # TEST ok( diff -Nru libconfig-inifiles-perl-2.79/t/03comments.t libconfig-inifiles-perl-2.82/t/03comments.t --- libconfig-inifiles-perl-2.79/t/03comments.t 2013-05-06 07:09:50.000000000 +0000 +++ libconfig-inifiles-perl-2.82/t/03comments.t 2013-05-21 15:33:29.000000000 +0000 @@ -96,7 +96,7 @@ # TEST ok ( $ini->SetParameterComment( - 'foo', 'bar', 'This is a parameter comment', + 'foo', 'bar', 'This is a parameter comment', 'This comment takes two lines!' ), "SetParameterCount was successful", diff -Nru libconfig-inifiles-perl-2.79/t/05hash.t libconfig-inifiles-perl-2.82/t/05hash.t --- libconfig-inifiles-perl-2.79/t/05hash.t 2013-05-06 07:09:50.000000000 +0000 +++ libconfig-inifiles-perl-2.82/t/05hash.t 2013-05-21 15:33:29.000000000 +0000 @@ -22,7 +22,7 @@ # Tying a hash. # TEST ok ( - (tie %ini, 'Config::IniFiles', + (tie %ini, 'Config::IniFiles', ( -file => t_file("test.ini"), -default => 'test1', -nocase => 1 ) ), "Tie to test.ini was succesful." @@ -43,7 +43,7 @@ # Retrieve array reference $value = $ini{test1}{mult}; # TEST -is (ref($value), 'ARRAY', "test1/mult is an array."); +is (ref($value), 'ARRAY', "test1/mult is an array."); # Test 4 # Creating a scalar value using tied hash @@ -145,7 +145,7 @@ tied(%ini)->ReadConfig; @value = @{$ini{test1}{multi_2}}; # TEST -is_deeply ( \@value, ['line 1', 'line 2'], +is_deeply ( \@value, ['line 1', 'line 2'], "Writing 2 line multilvalue and returing it" ); diff -Nru libconfig-inifiles-perl-2.79/t/06oo.t libconfig-inifiles-perl-2.82/t/06oo.t --- libconfig-inifiles-perl-2.79/t/06oo.t 2013-05-06 07:09:50.000000000 +0000 +++ libconfig-inifiles-perl-2.82/t/06oo.t 2013-05-21 15:33:29.000000000 +0000 @@ -4,7 +4,7 @@ use warnings; # Originally: 9 -use Test::More tests => 9; +use Test::More tests => 11; use Config::IniFiles; @@ -74,12 +74,24 @@ "DeleteSectionComment was successful."); # test 8 +# CopySection +$ini->CopySection( 'Section1', 'Section2' ); +# TEST +ok( $ini->Parameters( 'Section2' ), "CopySection was successful." ); + +# test 9 # DeleteSection $ini->DeleteSection( 'Section1' ); # TEST ok( ! $ini->Parameters( 'Section1' ), "DeleteSection was successful." ); -# test 9 +# test 10 +# RenameSection +$ini->RenameSection( 'Section2', 'Section1' ); +# TEST +ok( ! $ini->Parameters( 'Section2' ) && $ini->Parameters( 'Section1' ) && $ini->val('Section1','Parameter1') eq 'Value1' , "RenameSection was successful." ); + +# test 11 # Delete entire config $ini->Delete(); # TEST diff -Nru libconfig-inifiles-perl-2.79/t/07misc.t libconfig-inifiles-perl-2.82/t/07misc.t --- libconfig-inifiles-perl-2.79/t/07misc.t 2013-05-06 07:09:50.000000000 +0000 +++ libconfig-inifiles-perl-2.82/t/07misc.t 2013-05-21 15:33:29.000000000 +0000 @@ -27,17 +27,17 @@ # Parameters whose name is a substring of existing parameters should be loaded $value = $ini->val('substring', 'boot'); # TEST -is( $value, 'smarty', +is( $value, 'smarty', "Parameters whose name is a substring of existing parameters should be loaded"); -# test 3 +# test 3 # See if default option works $ini = Config::IniFiles->new( -file => t_file("test.ini"), -default => 'test1', -nocase => 1 ); $ini->SetFileName(t_file("test07.ini")); $ini->SetWriteMode("0666"); # TEST -ok (defined($ini), +ok (defined($ini), "default option works - \$ini works."); # TEST @@ -55,7 +55,7 @@ if (-w t_file("test07.ini")) { skip ('RO Permissions not settable.', 1); - } + } else { $ini->setval('test2', 'three', 'should not be here'); diff -Nru libconfig-inifiles-perl-2.79/t/09case.t libconfig-inifiles-perl-2.82/t/09case.t --- libconfig-inifiles-perl-2.79/t/09case.t 2013-05-06 07:09:50.000000000 +0000 +++ libconfig-inifiles-perl-2.82/t/09case.t 2013-05-21 15:33:29.000000000 +0000 @@ -132,7 +132,7 @@ my @values = $ini->val("Section", "parameter"); # TEST - is_deeply (\@values, ["Title Case"], + is_deeply (\@values, ["Title Case"], "case-insensitive version returns one value" ); } @@ -170,7 +170,7 @@ # TEST is ( - scalar($ini->val('mixedcasesect', 'mixedcaseparam')), + scalar($ini->val('mixedcasesect', 'mixedcaseparam')), 'MixedCaseVal', "Mixed case val.", ); diff -Nru libconfig-inifiles-perl-2.79/t/10delta.t libconfig-inifiles-perl-2.82/t/10delta.t --- libconfig-inifiles-perl-2.79/t/10delta.t 2013-05-06 07:09:50.000000000 +0000 +++ libconfig-inifiles-perl-2.82/t/10delta.t 2013-05-21 15:33:29.000000000 +0000 @@ -44,7 +44,7 @@ # TEST ok( $es, "Es was instantiated." ); -my $estext=slurp(t_file("es.ini")); +my $estext=slurp(t_file("es.ini")); $estext =~ s/\s*//g; # test 3 @@ -53,7 +53,7 @@ t_unlink('delta.ini'); $es->WriteConfig(t_file('delta.ini'), -delta=>1); -my $deltatext=slurp(t_file('delta.ini')); +my $deltatext=slurp(t_file('delta.ini')); $deltatext =~ s/\s*//g; # TEST diff -Nru libconfig-inifiles-perl-2.79/t/15store-and-retrieve-here-doc-terminator.t libconfig-inifiles-perl-2.82/t/15store-and-retrieve-here-doc-terminator.t --- libconfig-inifiles-perl-2.79/t/15store-and-retrieve-here-doc-terminator.t 2013-05-06 07:09:50.000000000 +0000 +++ libconfig-inifiles-perl-2.82/t/15store-and-retrieve-here-doc-terminator.t 2013-05-21 15:33:29.000000000 +0000 @@ -19,7 +19,7 @@ ( sub { my ($cfg) = @_; - + $cfg->WriteConfig($filename); return; diff -Nru libconfig-inifiles-perl-2.79/t/16case-sensitive-default.t libconfig-inifiles-perl-2.82/t/16case-sensitive-default.t --- libconfig-inifiles-perl-2.79/t/16case-sensitive-default.t 2013-05-06 07:09:50.000000000 +0000 +++ libconfig-inifiles-perl-2.82/t/16case-sensitive-default.t 2013-05-21 15:33:29.000000000 +0000 @@ -1,7 +1,7 @@ #!/usr/bin/perl # This script attempts to reproduce: -# https://sourceforge.net/tracker/index.php?func=detail&aid=1565180&group_id=6926&atid=106926 +# https://sourceforge.net/tracker/index.php?func=detail&aid=1565180&group_id=6926&atid=106926 use strict; use warnings; diff -Nru libconfig-inifiles-perl-2.79/t/17untainted-multiline-values.t libconfig-inifiles-perl-2.82/t/17untainted-multiline-values.t --- libconfig-inifiles-perl-2.79/t/17untainted-multiline-values.t 2013-05-06 07:09:50.000000000 +0000 +++ libconfig-inifiles-perl-2.82/t/17untainted-multiline-values.t 2013-05-21 15:33:29.000000000 +0000 @@ -1,7 +1,7 @@ #!/usr/bin/perl -T # This script attempts to reproduce: -# https://sourceforge.net/tracker/index.php?func=detail&aid=1565180&group_id=6926&atid=106926 +# https://sourceforge.net/tracker/index.php?func=detail&aid=1565180&group_id=6926&atid=106926 use strict; use warnings; diff -Nru libconfig-inifiles-perl-2.79/t/18non-contiguous-groups.t libconfig-inifiles-perl-2.82/t/18non-contiguous-groups.t --- libconfig-inifiles-perl-2.79/t/18non-contiguous-groups.t 2013-05-06 07:09:50.000000000 +0000 +++ libconfig-inifiles-perl-2.82/t/18non-contiguous-groups.t 2013-05-21 15:33:29.000000000 +0000 @@ -1,7 +1,7 @@ #!/usr/bin/perl -T # This script attempts to reproduce: -# https://sourceforge.net/tracker/index.php?func=detail&aid=1720915&group_id=6926&atid=106926 +# https://sourceforge.net/tracker/index.php?func=detail&aid=1720915&group_id=6926&atid=106926 use strict; use warnings; diff -Nru libconfig-inifiles-perl-2.79/t/19param-found-outside-section.t libconfig-inifiles-perl-2.82/t/19param-found-outside-section.t --- libconfig-inifiles-perl-2.79/t/19param-found-outside-section.t 2013-05-06 07:09:50.000000000 +0000 +++ libconfig-inifiles-perl-2.82/t/19param-found-outside-section.t 2013-05-21 15:33:29.000000000 +0000 @@ -57,7 +57,7 @@ # TEST ok($ini->exists('GENERAL', 'wrong'), "(-fallback) Fallback section catches parameter"); - + # TEST my $newfilename = File::Spec->catfile($dir_name, "new.ini"); my $content; diff -Nru libconfig-inifiles-perl-2.79/t/20allowedcommentchars.t libconfig-inifiles-perl-2.82/t/20allowedcommentchars.t --- libconfig-inifiles-perl-2.79/t/20allowedcommentchars.t 2013-05-06 07:09:50.000000000 +0000 +++ libconfig-inifiles-perl-2.82/t/20allowedcommentchars.t 2013-05-21 15:33:29.000000000 +0000 @@ -1,7 +1,7 @@ #!/usr/bin/perl # This script attempts to reproduce: -# https://rt.cpan.org/Ticket/Display.html?id=36309 +# https://rt.cpan.org/Ticket/Display.html?id=36309 use strict; use warnings; @@ -16,9 +16,9 @@ ); { - my $cfg = + my $cfg = Config::IniFiles->new( - -file => $filename, + -file => $filename, -allowedcommentchars => '};', ); diff -Nru libconfig-inifiles-perl-2.79/t/22trailing-comment-lines.t libconfig-inifiles-perl-2.82/t/22trailing-comment-lines.t --- libconfig-inifiles-perl-2.79/t/22trailing-comment-lines.t 2013-05-06 07:09:50.000000000 +0000 +++ libconfig-inifiles-perl-2.82/t/22trailing-comment-lines.t 2013-05-21 15:33:29.000000000 +0000 @@ -40,7 +40,7 @@ "WriteConfig() Preserved end comments." ); - # Remove the generated files so they won't pollute the filesystem / + # Remove the generated files so they won't pollute the filesystem / # working-copy. unlink($new_file); } diff -Nru libconfig-inifiles-perl-2.79/t/23scalar-ref.t libconfig-inifiles-perl-2.82/t/23scalar-ref.t --- libconfig-inifiles-perl-2.79/t/23scalar-ref.t 2013-05-06 07:09:50.000000000 +0000 +++ libconfig-inifiles-perl-2.82/t/23scalar-ref.t 2013-05-21 15:33:29.000000000 +0000 @@ -34,7 +34,7 @@ ok ($conf, "Object was initialised from reference to scalar."); # TEST - is ($conf->val("section1", "key"), + is ($conf->val("section1", "key"), "val", "Object works." ); diff -Nru libconfig-inifiles-perl-2.79/t/24case-sensitive-exists.t libconfig-inifiles-perl-2.82/t/24case-sensitive-exists.t --- libconfig-inifiles-perl-2.79/t/24case-sensitive-exists.t 2013-05-06 07:09:50.000000000 +0000 +++ libconfig-inifiles-perl-2.82/t/24case-sensitive-exists.t 2013-05-21 15:33:29.000000000 +0000 @@ -1,7 +1,7 @@ #!/usr/bin/perl # This script attempts to reproduce: -# https://rt.cpan.org/Ticket/Display.html?id=46721 +# https://rt.cpan.org/Ticket/Display.html?id=46721 # # #46721: $config->exists() does not pay attention to -nocase => 1 @@ -16,19 +16,19 @@ { my $conf = Config::IniFiles->new( - -file => File::Spec->catfile(File::Spec->curdir(), + -file => File::Spec->catfile(File::Spec->curdir(), 't', 'case-sensitive.ini' ), -nocase => 1 ); # TEST - ok (scalar($conf->exists('FOO', 'BAR')), + ok (scalar($conf->exists('FOO', 'BAR')), "->exists() Handles case well" ); - + # TEST - is (scalar($conf->val('FOO', 'BAR')), "goodness", + is (scalar($conf->val('FOO', 'BAR')), "goodness", "->val() Handles case well" ); } diff -Nru libconfig-inifiles-perl-2.79/t/25line-endings.t libconfig-inifiles-perl-2.82/t/25line-endings.t --- libconfig-inifiles-perl-2.79/t/25line-endings.t 2013-05-06 07:09:50.000000000 +0000 +++ libconfig-inifiles-perl-2.82/t/25line-endings.t 2013-05-21 15:33:29.000000000 +0000 @@ -22,7 +22,7 @@ { # being pedantic, we don't take line breaks from this or an external file for granted - my $sample_ini = + my $sample_ini = " # this is a sample file for testing the proper detection of line endings in Config::Inifiles @@ -54,7 +54,7 @@ # TEST ok($cfg, "Loading from a '$lf_print'-separated file"); - + # TEST my $value = $cfg->val('single values', 'firstval'); is ( diff -Nru libconfig-inifiles-perl-2.79/t/26scalar-filehandle.t libconfig-inifiles-perl-2.82/t/26scalar-filehandle.t --- libconfig-inifiles-perl-2.79/t/26scalar-filehandle.t 2013-05-06 07:09:50.000000000 +0000 +++ libconfig-inifiles-perl-2.82/t/26scalar-filehandle.t 2013-05-21 15:33:29.000000000 +0000 @@ -1,11 +1,11 @@ #!/usr/bin/perl # This script is a regression test for: -# +# # https://rt.cpan.org/Ticket/Display.html?id=54997 # # Failure to read the ini file contents from a filehandle made out of a scalar # -# <<< [patch] stat() on unopened filehandle warning thrown when using +# <<< [patch] stat() on unopened filehandle warning thrown when using # filehandle made from a scalar. >>> use Test::More; @@ -45,7 +45,7 @@ ok(!$EVAL_ERROR, "Object was initialised from filehandle made out of a scalar."); # TEST - is ($conf->val("section1", "key"), + is ($conf->val("section1", "key"), "val", "Object works." ); diff -Nru libconfig-inifiles-perl-2.79/t/27empty-ini.t libconfig-inifiles-perl-2.82/t/27empty-ini.t --- libconfig-inifiles-perl-2.79/t/27empty-ini.t 2013-05-06 07:09:50.000000000 +0000 +++ libconfig-inifiles-perl-2.82/t/27empty-ini.t 2013-05-21 15:33:29.000000000 +0000 @@ -25,7 +25,7 @@ # TEST is_deeply ( - \@Groups, + \@Groups, [], "Groups is empty." ); diff -Nru libconfig-inifiles-perl-2.79/t/29end-of-line-comment.t libconfig-inifiles-perl-2.82/t/29end-of-line-comment.t --- libconfig-inifiles-perl-2.79/t/29end-of-line-comment.t 2013-05-06 07:09:50.000000000 +0000 +++ libconfig-inifiles-perl-2.82/t/29end-of-line-comment.t 2013-05-21 15:33:29.000000000 +0000 @@ -23,11 +23,11 @@ "end-of-line-comment.ini"), -handle_trailing_comment => 1); # TEST - is($ini->val("section1", "param1"), "value1", + is($ini->val("section1", "param1"), "value1", "Comments after ';' should be omitted when tailing comment enabled"); # TEST - is($ini->GetParameterTrailingComment("section1", "param1"), + is($ini->GetParameterTrailingComment("section1", "param1"), "comment1", "Test GetParameterTrailingComment()"); # Test write back @@ -47,32 +47,32 @@ # Test set() # TEST - ok($ini->SetParameterTrailingComment("section1", "param1", + ok($ini->SetParameterTrailingComment("section1", "param1", "changed comment1"), "Test SetParameterTrailingComment() returns."); # TEST - is($ini->GetParameterTrailingComment("section1", "param1"), + is($ini->GetParameterTrailingComment("section1", "param1"), "changed comment1", "Test whether SetParameterTrailingComments() works."); } # Test of handle_trailing_comment disabled { my $ini = Config::IniFiles->new( -file => t_file( - "end-of-line-comment.ini"), -handle_trailing_comment => 0); + "end-of-line-comment.ini"), -handle_trailing_comment => 0); # TEST - is($ini->val("section1", "param1"), "value1;comment1", + is($ini->val("section1", "param1"), "value1;comment1", "Comments after ';' should be kept when tailing comment disabled"); # TEST - is($ini->GetParameterTrailingComment("section1", "param1"), + is($ini->GetParameterTrailingComment("section1", "param1"), "", "Test whether SetParameterTrailingComments() works."); } # Test of default handle_trailing_comment { # The default handle_trailing_comment param should be off - my $ini = Config::IniFiles->new( -file => - t_file("end-of-line-comment.ini") ); + my $ini = Config::IniFiles->new( -file => + t_file("end-of-line-comment.ini") ); # TEST - is($ini->val("section1", "param1"), "value1;comment1", + is($ini->val("section1", "param1"), "value1;comment1", "Test default trailing comment, which should be off."); } diff -Nru libconfig-inifiles-perl-2.79/t/31comments_with_spaces.t libconfig-inifiles-perl-2.82/t/31comments_with_spaces.t --- libconfig-inifiles-perl-2.79/t/31comments_with_spaces.t 2013-05-06 07:09:50.000000000 +0000 +++ libconfig-inifiles-perl-2.82/t/31comments_with_spaces.t 2013-05-21 15:33:29.000000000 +0000 @@ -41,6 +41,6 @@ # TEST is( $ini->val('section','value2'), 'xxx' ); # TEST -is( $ini->GetParameterTrailingComment('section','value2'), 'My_Comment'); +is( $ini->GetParameterTrailingComment('section','value2'), 'My_Comment'); unlink( $ini_filename ); diff -Nru libconfig-inifiles-perl-2.79/t/32mswin-outputs-contain-crs.t libconfig-inifiles-perl-2.82/t/32mswin-outputs-contain-crs.t --- libconfig-inifiles-perl-2.79/t/32mswin-outputs-contain-crs.t 2013-05-06 07:09:50.000000000 +0000 +++ libconfig-inifiles-perl-2.82/t/32mswin-outputs-contain-crs.t 2013-05-21 15:33:29.000000000 +0000 @@ -76,12 +76,12 @@ { my ($userConfig_fn, $section, $param, $value) = @_; - my $usrCfg = Config::IniFiles->new( -file => $userConfig_fn ) + my $usrCfg = Config::IniFiles->new( -file => $userConfig_fn ) or die "Failed! Could not open $userConfig_fn with error @Config::IniFiles::errors\n" ; - $usrCfg->newval($section, $param, $value) + $usrCfg->newval($section, $param, $value) or die "Could not set newval in writeIni for $section, $param -> $value\n"; - + my $c = 0; while ($c < 6) @@ -92,7 +92,7 @@ print "Writing [$section] $param -> $value\n"; } else - { + { warn "Error: could not write $param=$value to $userConfig_fn\n"; sleep 1; $c++; diff -Nru libconfig-inifiles-perl-2.79/t/style-trailing-space.t libconfig-inifiles-perl-2.82/t/style-trailing-space.t --- libconfig-inifiles-perl-2.79/t/style-trailing-space.t 1970-01-01 00:00:00.000000000 +0000 +++ libconfig-inifiles-perl-2.82/t/style-trailing-space.t 2013-05-21 15:33:29.000000000 +0000 @@ -0,0 +1,29 @@ +#!/usr/bin/perl + +use strict; +use warnings; + +use Test::More; + +eval "use Test::TrailingSpace"; +if ($@) +{ + plan skip_all => "Test::TrailingSpace required for trailing space test."; +} +else +{ + plan tests => 1; +} + +my $finder = Test::TrailingSpace->new( + { + root => '.', + filename_regex => qr/(?:(?:\.(?:t|pm|pl|PL|yml|json|arc|vim))|README|Changes|LICENSE)\z/, + }, +); + +# TEST +$finder->no_trailing_space( + "No trailing space was found." +); +