Hello community,
here is the log from the commit of package perl-Config-IniFiles for
openSUSE:Factory checked in at 2013-06-06 13:11:52
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Config-IniFiles (Old)
and /work/SRC/openSUSE:Factory/.perl-Config-IniFiles.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Config-IniFiles"
Changes:
--------
---
/work/SRC/openSUSE:Factory/perl-Config-IniFiles/perl-Config-IniFiles.changes
2012-05-31 17:08:04.000000000 +0200
+++
/work/SRC/openSUSE:Factory/.perl-Config-IniFiles.new/perl-Config-IniFiles.changes
2013-06-06 13:11:53.000000000 +0200
@@ -1,0 +2,29 @@
+Mon Jun 3 15:55:18 UTC 2013 - [email protected]
+
+- updated to 2.82
+ * Add t/style-trailing-space.t .
+ - Remove trailing space.
+
+ * Add the CopySection method to copy a section.
+ - Thanks to James Rouzier.
+
+ * Add the RenameSection method to rename a section.
+ - Thanks to James Rouzier.
+
+ * Fix test failures with Pod-Simple-3.28:
+ -
http://www.cpantesters.org/cpan/report/98f9d3a8-b557-11e2-9adc-3d5fc1508286
+
+ * Fix https://rt.cpan.org/Public/Bug/Display.html?id=80259:
+ - Warnings on undefined value in length in perl-5.10.x.
+
+ * Bump the List::MoreUtils dependency to '0.33'.
+ - https://rt.cpan.org/Ticket/Display.html?id=77930
+ - Thanks to TJENNESS for the report.
+
+ * Correct the documentation regarding the syntax of calling ->WriteConfig(),
+ which always accepts a mandatory filename and not just
+ "->WriteConfig(-delta => 1)".
+ - Thanks to the Mageia Linux QA team at:
+ - https://bugs.mageia.org/show_bug.cgi?id=6024#c17
+
+-------------------------------------------------------------------
Old:
----
Config-IniFiles-2.75.tar.gz
New:
----
Config-IniFiles-2.82.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Config-IniFiles.spec ++++++
--- /var/tmp/diff_new_pack.bO6GWk/_old 2013-06-06 13:11:53.000000000 +0200
+++ /var/tmp/diff_new_pack.bO6GWk/_new 2013-06-06 13:11:53.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package perl-Config-IniFiles
#
-# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,30 +17,29 @@
Name: perl-Config-IniFiles
+Version: 2.82
+Release: 0
%define cpan_name Config-IniFiles
-Summary: Module for reading .ini-style configuration files
-License: GPL-1.0+ or Artistic-1.0
+Summary: A module for reading .ini-style configuration files.
+License: Artistic-1.0 or GPL-1.0+
Group: Development/Libraries/Perl
-Version: 2.75
-Release: 0
Url: http://search.cpan.org/dist/Config-IniFiles/
-#Source:
http://www.cpan.org/modules/by-module/Config/Config-IniFiles-2.58.tar.gz
-Source: %{cpan_name}-%{version}.tar.gz
+Source:
http://www.cpan.org/authors/id/S/SH/SHLOMIF/%{cpan_name}-%{version}.tar.gz
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
BuildRequires: perl-macros
-BuildRequires: perl(File::Basename)
-BuildRequires: perl(File::Temp)
-BuildRequires: perl(IO::Scalar)
-BuildRequires: perl(List::MoreUtils)
-BuildRequires: perl(Module::Build)
-BuildRequires: perl(Test::Pod) >= 1.14
-BuildRequires: perl(Test::Pod::Coverage) >= 1.04
-Requires: perl(File::Basename)
-Requires: perl(File::Temp)
-Requires: perl(IO::Scalar)
-Requires: perl(List::MoreUtils)
+BuildRequires: perl(List::MoreUtils) >= 0.33
+BuildRequires: perl(Module::Build) >= 0.36
+#BuildRequires: perl(Config::IniFiles)
+#BuildRequires: perl(Config::IniFiles::Debug)
+#BuildRequires: perl(Config::IniFiles::TestPaths)
+#BuildRequires: perl(IO::All)
+#BuildRequires: perl(IO::Scalar)
+#BuildRequires: perl(Module::Build::Compat) >= 0.02
+#BuildRequires: perl(Test::Run::Builder)
+#BuildRequires: perl(Test::Run::CmdLine::Iface)
+Requires: perl(List::MoreUtils) >= 0.33
%{perl_requires}
%description
@@ -49,35 +48,22 @@
stacked,...), sections can be grouped, and settings can be accessed from a
tied hash.
-
-
-Authors:
---------
- Scott Hutton
- Rich Bowen <[email protected]>
- Jeremy Wadsack <dgsupport at wadsack-allen dot com>
-
%prep
-%setup -q -n Config-IniFiles-%{version}
-#rpmlint: wrong-file-end-of-line-encoding
-%{__perl} -p -i -e "s|\r\n|\n|" Changes
+%setup -q -n %{cpan_name}-%{version}
%build
%{__perl} Build.PL installdirs=vendor
-./Build
+./Build build flags=%{?_smp_mflags}
%check
./Build test
%install
-./Build install destdir=$RPM_BUILD_ROOT create_packlist=0
+./Build install destdir=%{buildroot} create_packlist=0
%perl_gen_filelist
-%clean
-%{__rm} -rf $RPM_BUILD_ROOT
-
%files -f %{name}.files
-%defattr(-,root,root,-)
-%doc Changes README
+%defattr(-,root,root,755)
+%doc Changes README scripts
%changelog
++++++ Config-IniFiles-2.75.tar.gz -> Config-IniFiles-2.82.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Config-IniFiles-2.75/Build.PL
new/Config-IniFiles-2.82/Build.PL
--- old/Config-IniFiles-2.75/Build.PL 2012-05-25 14:29:14.000000000 +0200
+++ new/Config-IniFiles-2.82/Build.PL 2013-05-21 17:33:29.000000000 +0200
@@ -34,7 +34,7 @@
'Fcntl' => 0,
'File::Basename' => 0,
'File::Temp' => 0,
- 'List::MoreUtils' => 0,
+ 'List::MoreUtils' => '0.33',
},
create_makefile_pl => 'small',
meta_merge =>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Config-IniFiles-2.75/Changes
new/Config-IniFiles-2.82/Changes
--- old/Config-IniFiles-2.75/Changes 2012-05-25 14:29:14.000000000 +0200
+++ new/Config-IniFiles-2.82/Changes 2013-05-21 17:33:29.000000000 +0200
@@ -1,9 +1,55 @@
+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 )
+------------------------------------------------
+
+* Fix test failures with Pod-Simple-3.28:
+ -
http://www.cpantesters.org/cpan/report/98f9d3a8-b557-11e2-9adc-3d5fc1508286
+
+Version 2.78 ( Sun 21 Oct 13:14:39 IST 2012 )
+------------------------------------------------
+
+* Fix https://rt.cpan.org/Public/Bug/Display.html?id=80259:
+ - Warnings on undefined value in length in perl-5.10.x.
+
+Version 2.77 ( Thu Jun 21 19:35:23 IDT 2012 )
+------------------------------------------------
+
+* Bump the List::MoreUtils dependency to '0.33'.
+ - https://rt.cpan.org/Ticket/Display.html?id=77930
+ - Thanks to TJENNESS for the report.
+
+Version 2.76 ( Fri Jun 15 17:44:31 IDT 2012 )
+------------------------------------------------
+
+* Correct the documentation regarding the syntax of calling ->WriteConfig(),
+which always accepts a mandatory filename and not just
+"->WriteConfig(-delta => 1)".
+ - Thanks to the Mageia Linux QA team at:
+ - https://bugs.mageia.org/show_bug.cgi?id=6024#c17
+
Version 2.75 ( Fri May 25 15:25:29 IDT 2012 )
------------------------------------------------
* Add "=encoding utf8" to the POD of lib/Config/IniFiles.pm
- The POD contained wide characters and it is now an error in
- with recent Test::Pod and Pod::Simple.
+ with recent Test::Pod and Pod::Simple.
- See for example:
http://www.cpantesters.org/cpan/report/89000ebe-a5bc-11e1-a439-fa78ab6c2661
Version 2.74 ( Thu May 24 00:46:37 IDT 2012 )
@@ -69,7 +115,7 @@
* Add the method ->OutputConfigToFileHandle which is a more explicit and
safer version of ->OutputConfig.
- ->OutputConfig now uses it.
- - all existing tests pass, and a new test was added to
+ - all existing tests pass, and a new test was added to
t/15store-and-retrieve-here-doc-terminator.t .
* Started refactoring the code.
@@ -94,7 +140,7 @@
comments at the end of a param=value line.
- Fixes https://rt.cpan.org/Public/Bug/Display.html?id=43843 .
- Original patch by Peter Xu.
- - Some comments and corrections of the patch by Shlomi Fish (the current
+ - Some comments and corrections of the patch by Shlomi Fish (the current
Config-IniFiles maintainer.)
Version 2.65: ( Thu Nov 25 12:00:00 IST 2010 )
@@ -118,7 +164,7 @@
* Fixed https://rt.cpan.org/Ticket/Display.html?id=63079 by
refactoring/bug-fixing the main module into the _OutputParam method, which
handles the output of multi-line and single-line parameters with all the edge
-cases.
+cases.
- The reported problem was that EOT was encountered again in certain cases
in the output string, and now we make sure the program always avoid it. The
reappearance of the bug was caused due to duplicate code, which was now
@@ -129,9 +175,9 @@
* Applied a modified version of Steven Haryanto's commit
ac6ace8bf09fabba4e6ea3b2826ff13cd30507bc :
- - When writing config with fallback section, also omit the fallback
+ - When writing config with fallback section, also omit the fallback
section header, like the original file. Also, change
- t/19param-found-outside-section.t a bit to not require IO::Scalar and use
+ t/19param-found-outside-section.t a bit to not require IO::Scalar and use
File::Temp instead (we are testing WriteConfig anyway).
- Shlomi Fish fixed unless'es to if's and converted a do { ... } if call to
a block conditional, as well as made the open statements on t/19param
@@ -188,7 +234,7 @@
Version 2.57: ( Mon Mar 1 15:49:54 IST 2010 )
------------------------------------------------
-* Fixed failure to read the ini file contents from a filehandle made out of a
+* Fixed failure to read the ini file contents from a filehandle made out of a
scalar
- https://rt.cpan.org/Ticket/Display.html?id=45997
- Applied a patch by Nicolas Mendoza - thanks!
@@ -289,8 +335,8 @@
- This was as opposed to the documentation.
- added t/21multiline-values-in-tied.t and fixed some older tests.
-* Moved the eval'ed debugging code (_assert_invariants) to its own module,
-without the eval so the perl-5.6.2 will be happy. Now explicitly use'ing it
+* Moved the eval'ed debugging code (_assert_invariants) to its own module,
+without the eval so the perl-5.6.2 will be happy. Now explicitly use'ing it
from t/lib where appropriate. See for example:
- http://www.nntp.perl.org/group/perl.cpan.testers/2009/01/msg3101788.html
@@ -310,7 +356,7 @@
- Testing for allowedcommentchars.
- the bug seems to be fixed in trunk.
-* Converted t/03comments.t to Test::More and did other cleanups in preparation
+* Converted t/03comments.t to Test::More and did other cleanups in preparation
of solving a few bugs.
* Now GetSectionComment does the documented behaviour in scalar context and
@@ -327,7 +373,7 @@
* Fixed bug #1230339:
-
https://sourceforge.net/tracker/index.php?func=detail&aid=1230339&group_id=6926&atid=106926
- Can't store and retrive "\nEOT\n"
-- Fixed by checking for the existence of the here-doc terminator in the
+- Fixed by checking for the existence of the here-doc terminator in the
string, and if so appending more characters.
* Fixed bug #1565180
@@ -589,7 +635,7 @@
should not be taken as a huge leap forward.
0.12 September 13, 2000 by JW/WADG
-* Added documentation to clarify autovivification issues when
+* Added documentation to clarify autovivification issues when
creating new sections
* Fixed version number (Oops!)
@@ -647,12 +693,12 @@
again.
0.02 Tue Jun 13, 2000 by RBOW
-* Fixed bug reported by Bernie Cosell - Sections, Parameters,
+* Fixed bug reported by Bernie Cosell - Sections, Parameters,
and GroupMembers return undef if there are no sections,
parameters, or group members. These functions now return
() if the particular value is undefined.
* Added some contributed documentation, from Alex Satrapa, explaining
-how the internal data structure works.
+how the internal data structure works.
* Set up a project on SourceForge. (Not a change, but worth
noting).
* Added Groups method to return a list of section groups.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Config-IniFiles-2.75/MANIFEST
new/Config-IniFiles-2.82/MANIFEST
--- old/Config-IniFiles-2.75/MANIFEST 2012-05-25 14:29:14.000000000 +0200
+++ new/Config-IniFiles-2.82/MANIFEST 2013-05-21 17:33:29.000000000 +0200
@@ -1,12 +1,13 @@
-
Build.PL
Changes
-inc/Test/Run/Builder.pm
-lib/Config/IniFiles.pm
-Makefile.PL
MANIFEST
+META.json
META.yml
+Makefile.PL
README
+inc/Test/Run/Builder.pm
+lib/Config/IniFiles.pm
+scripts/tag-release.pl
t/00load.t
t/01basic.t
t/02weird.t
@@ -39,7 +40,6 @@
t/30parameters-with-empty-values.t
t/31comments_with_spaces.t
t/32mswin-outputs-contain-crs.t
-tag-release.pl
t/allowed-comment-chars.ini
t/array.ini
t/bad.ini
@@ -49,8 +49,8 @@
t/case-sensitive-default.ini
t/case-sensitive.ini
t/cmt.ini
-t/end-of-line-comment.ini
t/en.ini
+t/end-of-line-comment.ini
t/es.ini
t/for-27-empty.ini
t/lib/Config/IniFiles/Debug.pm
@@ -58,6 +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
-META.json
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Config-IniFiles-2.75/META.json
new/Config-IniFiles-2.82/META.json
--- old/Config-IniFiles-2.75/META.json 2012-05-25 14:29:14.000000000 +0200
+++ new/Config-IniFiles-2.82/META.json 2013-05-21 17:33:29.000000000 +0200
@@ -4,7 +4,7 @@
"Shlomi Fish <[email protected]>"
],
"dynamic_config" : 1,
- "generated_by" : "Module::Build version 0.3901, CPAN::Meta::Converter
version 2.120630",
+ "generated_by" : "Module::Build version 0.3901, CPAN::Meta::Converter
version 2.120921",
"keywords" : [
"ini",
"files",
@@ -47,7 +47,7 @@
"Fcntl" : "0",
"File::Basename" : "0",
"File::Temp" : "0",
- "List::MoreUtils" : "0",
+ "List::MoreUtils" : "0.33",
"Symbol" : "0",
"strict" : "0",
"warnings" : "0"
@@ -57,7 +57,7 @@
"provides" : {
"Config::IniFiles" : {
"file" : "lib/Config/IniFiles.pm",
- "version" : "2.75"
+ "version" : "2.82"
}
},
"release_status" : "stable",
@@ -70,5 +70,5 @@
"url" : "https://bitbucket.org/shlomif/perl-config-inifiles"
}
},
- "version" : "2.75"
+ "version" : "2.82"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Config-IniFiles-2.75/META.yml
new/Config-IniFiles-2.82/META.yml
--- old/Config-IniFiles-2.75/META.yml 2012-05-25 14:29:14.000000000 +0200
+++ new/Config-IniFiles-2.82/META.yml 2013-05-21 17:33:29.000000000 +0200
@@ -13,7 +13,7 @@
configure_requires:
Module::Build: 0.36
dynamic_config: 1
-generated_by: 'Module::Build version 0.3901, CPAN::Meta::Converter version
2.120630'
+generated_by: 'Module::Build version 0.3901, CPAN::Meta::Converter version
2.120921'
keywords:
- ini
- files
@@ -32,13 +32,13 @@
provides:
Config::IniFiles:
file: lib/Config/IniFiles.pm
- version: 2.75
+ version: 2.82
requires:
Carp: 0
Fcntl: 0
File::Basename: 0
File::Temp: 0
- List::MoreUtils: 0
+ List::MoreUtils: 0.33
Symbol: 0
strict: 0
warnings: 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.75
+version: 2.82
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Config-IniFiles-2.75/README
new/Config-IniFiles-2.82/README
--- old/Config-IniFiles-2.75/README 2012-05-25 14:29:14.000000000 +0200
+++ new/Config-IniFiles-2.82/README 2013-05-21 17:33:29.000000000 +0200
@@ -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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Config-IniFiles-2.75/inc/Test/Run/Builder.pm
new/Config-IniFiles-2.82/inc/Test/Run/Builder.pm
--- old/Config-IniFiles-2.75/inc/Test/Run/Builder.pm 2012-05-25
14:29:14.000000000 +0200
+++ new/Config-IniFiles-2.82/inc/Test/Run/Builder.pm 2013-05-21
17:33:29.000000000 +0200
@@ -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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Config-IniFiles-2.75/lib/Config/IniFiles.pm
new/Config-IniFiles-2.82/lib/Config/IniFiles.pm
--- old/Config-IniFiles-2.75/lib/Config/IniFiles.pm 2012-05-25
14:29:14.000000000 +0200
+++ new/Config-IniFiles-2.82/lib/Config/IniFiles.pm 2013-05-21
17:33:29.000000000 +0200
@@ -2,7 +2,7 @@
use vars qw($VERSION);
-$VERSION = '2.75';
+$VERSION = '2.82';
require 5.004;
use strict;
@@ -255,7 +255,7 @@
=item I<-allowempty> 0|1
-If set to 1, then empty files are allowed at L</ReadConfig|ReadConfig()>
+If set to 1, then empty files are allowed at L<ReadConfig|ReadConfig()>
time. If set to 0 (the default), an empty configuration file is considered
an error.
@@ -276,7 +276,7 @@
If set to 0 (the default if not importing), these comments are treated
like ordinary ones.
-The L</WriteConfig|WriteConfig(-delta=>1)> form will output such
+The L<WriteConfig|WriteConfig($filename, -delta=>1)> form will output such
comments to indicate deleted sections or parameters. This way,
reloading a delta file using the same imported object produces the
same results in memory again. See L<IMPORT / DELTA FEATURES> for more
@@ -825,7 +825,9 @@
{
my $self = shift;
- return not length $self->{cf};
+ my $fn = $self->{cf};
+
+ return (not (defined($fn) && length($fn)));
}
sub _read_line_num
@@ -1233,7 +1235,7 @@
$self->{mysects} = []; # A pair of hashes to remember which params are
loaded
$self->{myparms} = {}; # or set using the API vs. imported - useful for
$self->{peCMT} = {}; # this will store trailing comments at the end of
single-lined params
- # import shadowing, see below, and WriteConfig(-delta=>1)
+ # import shadowing, see below, and WriteConfig($fn, -delta=>1)
if( defined $self->{imported} ) {
# Run up the import tree to the top, then reload coming
@@ -1451,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
@@ -1642,8 +1699,8 @@
=head2 WriteConfig ($filename [, %options])
Writes out a new copy of the configuration file. A temporary file
-(ending in '-new') is written out and then renamed to the specified
-filename. Also see B<BUGS> below.
+is written out and then renamed to the specified filename. Also see
+B<BUGS> below.
If C<-delta> is set to a true value in %options, and this object was
imported from another (see L</new>), only the differences between this
@@ -1687,7 +1744,7 @@
# Convert the filehandle to a "text" filehandle suitable for use
# on Windows (and other platforms).
- #
+ #
# This may break compatibility for ultra-old perls (ones before 5.6.0)
# so I say - Good Riddance!
if ($^O =~ m/\AMSWin/)
@@ -2390,7 +2447,7 @@
use Config::IniFiles;
- my %ini
+ my %ini;
tie %ini, 'Config::IniFiles', ( -file => "/path/configfile.ini" );
print "We have $ini{Section}{Parameter}." if $ini{Section}{Parameter};
@@ -2977,7 +3034,7 @@
$overlay->setval("section1", "arg1", "anotherval");
$overlay->newval("section3", "arg3", "val3");
- $overlay->WriteConfig(-delta=>1);
+ $overlay->WriteConfig('overlay.ini', -delta=>1);
C<overlay.ini> would now contain
@@ -3004,7 +3061,7 @@
$overlay->DeleteSection("section2");
$overlay->delval("section1", "arg0");
- $overlay->WriteConfig(-delta=>1);
+ $overlay->WriteConfig('overlay.ini', -delta=>1);
The I<overlay.ini> file would now read:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Config-IniFiles-2.75/scripts/tag-release.pl
new/Config-IniFiles-2.82/scripts/tag-release.pl
--- old/Config-IniFiles-2.75/scripts/tag-release.pl 1970-01-01
01:00:00.000000000 +0100
+++ new/Config-IniFiles-2.82/scripts/tag-release.pl 2013-05-21
17:33:29.000000000 +0200
@@ -0,0 +1,27 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use IO::All;
+
+my ($version) =
+ (map { m{\$VERSION *= *'([^']+)'} ? ($1) : () }
+ io->file('lib/Config/IniFiles.pm')->getlines()
+ )
+ ;
+
+if (!defined ($version))
+{
+ die "Version is undefined!";
+}
+
+my @cmd = (
+ "hg", "tag", "-m",
+ "Tagging the Config-IniFiles release as $version",
+ "releases/$version",
+);
+
+print join(" ", map { /\s/ ? qq{"$_"} : $_ } @cmd), "\n";
+exec(@cmd);
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Config-IniFiles-2.75/t/00load.t
new/Config-IniFiles-2.82/t/00load.t
--- old/Config-IniFiles-2.75/t/00load.t 2012-05-25 14:29:14.000000000 +0200
+++ new/Config-IniFiles-2.82/t/00load.t 2013-05-21 17:33:29.000000000 +0200
@@ -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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Config-IniFiles-2.75/t/01basic.t
new/Config-IniFiles-2.82/t/01basic.t
--- old/Config-IniFiles-2.75/t/01basic.t 2012-05-25 14:29:14.000000000
+0200
+++ new/Config-IniFiles-2.82/t/01basic.t 2013-05-21 17:33:29.000000000
+0200
@@ -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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Config-IniFiles-2.75/t/02weird.t
new/Config-IniFiles-2.82/t/02weird.t
--- old/Config-IniFiles-2.75/t/02weird.t 2012-05-25 14:29:14.000000000
+0200
+++ new/Config-IniFiles-2.82/t/02weird.t 2013-05-21 17:33:29.000000000
+0200
@@ -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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Config-IniFiles-2.75/t/03comments.t
new/Config-IniFiles-2.82/t/03comments.t
--- old/Config-IniFiles-2.75/t/03comments.t 2012-05-25 14:29:14.000000000
+0200
+++ new/Config-IniFiles-2.82/t/03comments.t 2013-05-21 17:33:29.000000000
+0200
@@ -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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Config-IniFiles-2.75/t/05hash.t
new/Config-IniFiles-2.82/t/05hash.t
--- old/Config-IniFiles-2.75/t/05hash.t 2012-05-25 14:29:14.000000000 +0200
+++ new/Config-IniFiles-2.82/t/05hash.t 2013-05-21 17:33:29.000000000 +0200
@@ -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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Config-IniFiles-2.75/t/06oo.t
new/Config-IniFiles-2.82/t/06oo.t
--- old/Config-IniFiles-2.75/t/06oo.t 2012-05-25 14:29:14.000000000 +0200
+++ new/Config-IniFiles-2.82/t/06oo.t 2013-05-21 17:33:29.000000000 +0200
@@ -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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Config-IniFiles-2.75/t/07misc.t
new/Config-IniFiles-2.82/t/07misc.t
--- old/Config-IniFiles-2.75/t/07misc.t 2012-05-25 14:29:14.000000000 +0200
+++ new/Config-IniFiles-2.82/t/07misc.t 2013-05-21 17:33:29.000000000 +0200
@@ -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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Config-IniFiles-2.75/t/09case.t
new/Config-IniFiles-2.82/t/09case.t
--- old/Config-IniFiles-2.75/t/09case.t 2012-05-25 14:29:14.000000000 +0200
+++ new/Config-IniFiles-2.82/t/09case.t 2013-05-21 17:33:29.000000000 +0200
@@ -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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Config-IniFiles-2.75/t/10delta.t
new/Config-IniFiles-2.82/t/10delta.t
--- old/Config-IniFiles-2.75/t/10delta.t 2012-05-25 14:29:14.000000000
+0200
+++ new/Config-IniFiles-2.82/t/10delta.t 2013-05-21 17:33:29.000000000
+0200
@@ -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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Config-IniFiles-2.75/t/15store-and-retrieve-here-doc-terminator.t
new/Config-IniFiles-2.82/t/15store-and-retrieve-here-doc-terminator.t
--- old/Config-IniFiles-2.75/t/15store-and-retrieve-here-doc-terminator.t
2012-05-25 14:29:14.000000000 +0200
+++ new/Config-IniFiles-2.82/t/15store-and-retrieve-here-doc-terminator.t
2013-05-21 17:33:29.000000000 +0200
@@ -19,7 +19,7 @@
(
sub {
my ($cfg) = @_;
-
+
$cfg->WriteConfig($filename);
return;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Config-IniFiles-2.75/t/16case-sensitive-default.t
new/Config-IniFiles-2.82/t/16case-sensitive-default.t
--- old/Config-IniFiles-2.75/t/16case-sensitive-default.t 2012-05-25
14:29:14.000000000 +0200
+++ new/Config-IniFiles-2.82/t/16case-sensitive-default.t 2013-05-21
17:33:29.000000000 +0200
@@ -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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Config-IniFiles-2.75/t/17untainted-multiline-values.t
new/Config-IniFiles-2.82/t/17untainted-multiline-values.t
--- old/Config-IniFiles-2.75/t/17untainted-multiline-values.t 2012-05-25
14:29:14.000000000 +0200
+++ new/Config-IniFiles-2.82/t/17untainted-multiline-values.t 2013-05-21
17:33:29.000000000 +0200
@@ -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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Config-IniFiles-2.75/t/18non-contiguous-groups.t
new/Config-IniFiles-2.82/t/18non-contiguous-groups.t
--- old/Config-IniFiles-2.75/t/18non-contiguous-groups.t 2012-05-25
14:29:14.000000000 +0200
+++ new/Config-IniFiles-2.82/t/18non-contiguous-groups.t 2013-05-21
17:33:29.000000000 +0200
@@ -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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Config-IniFiles-2.75/t/19param-found-outside-section.t
new/Config-IniFiles-2.82/t/19param-found-outside-section.t
--- old/Config-IniFiles-2.75/t/19param-found-outside-section.t 2012-05-25
14:29:14.000000000 +0200
+++ new/Config-IniFiles-2.82/t/19param-found-outside-section.t 2013-05-21
17:33:29.000000000 +0200
@@ -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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Config-IniFiles-2.75/t/20allowedcommentchars.t
new/Config-IniFiles-2.82/t/20allowedcommentchars.t
--- old/Config-IniFiles-2.75/t/20allowedcommentchars.t 2012-05-25
14:29:14.000000000 +0200
+++ new/Config-IniFiles-2.82/t/20allowedcommentchars.t 2013-05-21
17:33:29.000000000 +0200
@@ -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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Config-IniFiles-2.75/t/22trailing-comment-lines.t
new/Config-IniFiles-2.82/t/22trailing-comment-lines.t
--- old/Config-IniFiles-2.75/t/22trailing-comment-lines.t 2012-05-25
14:29:14.000000000 +0200
+++ new/Config-IniFiles-2.82/t/22trailing-comment-lines.t 2013-05-21
17:33:29.000000000 +0200
@@ -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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Config-IniFiles-2.75/t/23scalar-ref.t
new/Config-IniFiles-2.82/t/23scalar-ref.t
--- old/Config-IniFiles-2.75/t/23scalar-ref.t 2012-05-25 14:29:14.000000000
+0200
+++ new/Config-IniFiles-2.82/t/23scalar-ref.t 2013-05-21 17:33:29.000000000
+0200
@@ -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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Config-IniFiles-2.75/t/24case-sensitive-exists.t
new/Config-IniFiles-2.82/t/24case-sensitive-exists.t
--- old/Config-IniFiles-2.75/t/24case-sensitive-exists.t 2012-05-25
14:29:14.000000000 +0200
+++ new/Config-IniFiles-2.82/t/24case-sensitive-exists.t 2013-05-21
17:33:29.000000000 +0200
@@ -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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Config-IniFiles-2.75/t/25line-endings.t
new/Config-IniFiles-2.82/t/25line-endings.t
--- old/Config-IniFiles-2.75/t/25line-endings.t 2012-05-25 14:29:14.000000000
+0200
+++ new/Config-IniFiles-2.82/t/25line-endings.t 2013-05-21 17:33:29.000000000
+0200
@@ -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 =
"<eol>
<sol># this is a sample file for testing the proper detection of line
endings in Config::Inifiles<eol>
<sol><eol>
@@ -54,7 +54,7 @@
# TEST
ok($cfg, "Loading from a '$lf_print'-separated file");
-
+
# TEST
my $value = $cfg->val('single values', 'firstval');
is (
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Config-IniFiles-2.75/t/26scalar-filehandle.t
new/Config-IniFiles-2.82/t/26scalar-filehandle.t
--- old/Config-IniFiles-2.75/t/26scalar-filehandle.t 2012-05-25
14:29:14.000000000 +0200
+++ new/Config-IniFiles-2.82/t/26scalar-filehandle.t 2013-05-21
17:33:29.000000000 +0200
@@ -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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Config-IniFiles-2.75/t/27empty-ini.t
new/Config-IniFiles-2.82/t/27empty-ini.t
--- old/Config-IniFiles-2.75/t/27empty-ini.t 2012-05-25 14:29:14.000000000
+0200
+++ new/Config-IniFiles-2.82/t/27empty-ini.t 2013-05-21 17:33:29.000000000
+0200
@@ -25,7 +25,7 @@
# TEST
is_deeply (
- \@Groups,
+ \@Groups,
[],
"Groups is empty."
);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Config-IniFiles-2.75/t/29end-of-line-comment.t
new/Config-IniFiles-2.82/t/29end-of-line-comment.t
--- old/Config-IniFiles-2.75/t/29end-of-line-comment.t 2012-05-25
14:29:14.000000000 +0200
+++ new/Config-IniFiles-2.82/t/29end-of-line-comment.t 2013-05-21
17:33:29.000000000 +0200
@@ -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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Config-IniFiles-2.75/t/31comments_with_spaces.t
new/Config-IniFiles-2.82/t/31comments_with_spaces.t
--- old/Config-IniFiles-2.75/t/31comments_with_spaces.t 2012-05-25
14:29:14.000000000 +0200
+++ new/Config-IniFiles-2.82/t/31comments_with_spaces.t 2013-05-21
17:33:29.000000000 +0200
@@ -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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Config-IniFiles-2.75/t/32mswin-outputs-contain-crs.t
new/Config-IniFiles-2.82/t/32mswin-outputs-contain-crs.t
--- old/Config-IniFiles-2.75/t/32mswin-outputs-contain-crs.t 2012-05-25
14:29:14.000000000 +0200
+++ new/Config-IniFiles-2.82/t/32mswin-outputs-contain-crs.t 2013-05-21
17:33:29.000000000 +0200
@@ -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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Config-IniFiles-2.75/t/style-trailing-space.t
new/Config-IniFiles-2.82/t/style-trailing-space.t
--- old/Config-IniFiles-2.75/t/style-trailing-space.t 1970-01-01
01:00:00.000000000 +0100
+++ new/Config-IniFiles-2.82/t/style-trailing-space.t 2013-05-21
17:33:29.000000000 +0200
@@ -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."
+);
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Config-IniFiles-2.75/tag-release.pl
new/Config-IniFiles-2.82/tag-release.pl
--- old/Config-IniFiles-2.75/tag-release.pl 2012-05-25 14:29:14.000000000
+0200
+++ new/Config-IniFiles-2.82/tag-release.pl 1970-01-01 01:00:00.000000000
+0100
@@ -1,30 +0,0 @@
-#!/usr/bin/perl
-
-use strict;
-use warnings;
-
-use IO::All;
-
-my ($version) =
- (map { m{\$VERSION *= *'([^']+)'} ? ($1) : () }
- io->file('lib/Config/IniFiles.pm')->getlines()
- )
- ;
-
-if (!defined ($version))
-{
- die "Version is undefined!";
-}
-
-my $mini_repos_base =
'https://config-inifiles.svn.sourceforge.net/svnroot/config-inifiles';
-
-my @cmd = (
- "svn", "copy", "-m",
- "Tagging the Config-IniFiles release as $version",
- "$mini_repos_base/trunk",
- "$mini_repos_base/tags/releases/$version",
-);
-
-print join(" ", map { /\s/ ? qq{"$_"} : $_ } @cmd), "\n";
-exec(@cmd);
-
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]