Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package perl-Config-Tiny for
openSUSE:Factory checked in at 2023-10-20 23:16:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Config-Tiny (Old)
and /work/SRC/openSUSE:Factory/.perl-Config-Tiny.new.1945 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Config-Tiny"
Fri Oct 20 23:16:18 2023 rev:23 rq:1118899 version:2.300.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Config-Tiny/perl-Config-Tiny.changes
2023-06-23 21:51:53.258383777 +0200
+++
/work/SRC/openSUSE:Factory/.perl-Config-Tiny.new.1945/perl-Config-Tiny.changes
2023-10-20 23:17:08.491339647 +0200
@@ -1,0 +2,18 @@
+Fri Oct 13 03:06:05 UTC 2023 - Tina Müller <[email protected]>
+
+- updated to 2.30
+ see /usr/share/doc/packages/perl-Config-Tiny/Changelog.ini
+
+ [V 2.30]
+ Date=2023-10-12T17:17:08
+ Comments= <<EOT
+ - As of V 2.30, this module supports an array syntax for cases where you
wish to
+ assign an array of values to a key.
+ - See the new POD section called ARRAY SYNTAX.
+ - See also the updated question in the FAQ: What happens if a key is
repeated?
+ - See also the sample code in the Synopsis and in t/02.main.t and in
t/test.conf.
+ - In each case, search for the word greetings to find the new code samples.
+ - This patch was kindly provided by Steven Schoch, with some additions by
Ron Savage.
+ EOT
+
+-------------------------------------------------------------------
Old:
----
Config-Tiny-2.29.tgz
New:
----
Config-Tiny-2.30.tgz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Config-Tiny.spec ++++++
--- /var/tmp/diff_new_pack.sBege5/_old 2023-10-20 23:17:08.975357307 +0200
+++ /var/tmp/diff_new_pack.sBege5/_new 2023-10-20 23:17:08.975357307 +0200
@@ -18,12 +18,13 @@
%define cpan_name Config-Tiny
Name: perl-Config-Tiny
-Version: 2.29
+Version: 2.300.0
Release: 0
+%define cpan_version 2.30
License: Artistic-1.0 OR GPL-1.0-or-later
Summary: Read/Write .ini style files with as little code as possible
URL: https://metacpan.org/release/%{cpan_name}
-Source0:
https://cpan.metacpan.org/authors/id/R/RS/RSAVAGE/%{cpan_name}-%{version}.tgz
+Source0:
https://cpan.metacpan.org/authors/id/R/RS/RSAVAGE/%{cpan_name}-%{cpan_version}.tgz
Source1: cpanspec.yml
BuildArch: noarch
BuildRequires: perl
@@ -33,13 +34,10 @@
BuildRequires: perl(Test::More) >= 1.001002
Requires: perl(File::Spec) >= 3.30
Requires: perl(File::Temp) >= 0.22
+Provides: perl(Config::Tiny) = 2.300.0
+%define __perllib_provides /bin/true
%{perl_requires}
-# make_build doesn't exist on SLES 12
-%if %{undefined make_build}
-%define make_build %{__make} %{?_smp_mflags}
-%endif
-
%description
'Config::Tiny' is a Perl class to read and write .ini style configuration
files with as little code as possible, reducing load time and memory
@@ -63,7 +61,7 @@
order of the entries in the file.
%prep
-%autosetup -n %{cpan_name}-%{version}
+%autosetup -n %{cpan_name}-%{cpan_version}
%build
perl Makefile.PL INSTALLDIRS=vendor
++++++ Config-Tiny-2.29.tgz -> Config-Tiny-2.30.tgz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Config-Tiny-2.29/Changelog.ini
new/Config-Tiny-2.30/Changelog.ini
--- old/Config-Tiny-2.29/Changelog.ini 2023-04-05 04:59:51.000000000 +0200
+++ new/Config-Tiny-2.30/Changelog.ini 2023-10-13 01:44:20.000000000 +0200
@@ -3,6 +3,18 @@
Changelog.Creator=Module::Metadata::Changes V 2.12
Changelog.Parser=Config::IniFiles V 3.000003
+[V 2.30]
+Date=2023-10-12T17:17:08
+Comments= <<EOT
+- As of V 2.30, this module supports an array syntax for cases where you wish
to
+assign an array of values to a key.
+- See the new POD section called ARRAY SYNTAX.
+- See also the updated question in the FAQ: What happens if a key is repeated?
+- See also the sample code in the Synopsis and in t/02.main.t and in
t/test.conf.
+- In each case, search for the word greetings to find the new code samples.
+- This patch was kindly provided by Steven Schoch, with some additions by Ron
Savage.
+EOT
+
[V 2.29]
Date=2023-04-05T12:53:00
Comments= <<EOT
@@ -147,6 +159,7 @@
- Add MANIFEST.SKIP, Changelog.ini, Build.PL, META.json.
- Add an FAQ to the docs.
- Clean up the docs.
+- As of this version, maintanence is by Ron Savage.
EOT
[V 2.14]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Config-Tiny-2.29/Changes new/Config-Tiny-2.30/Changes
--- old/Config-Tiny-2.29/Changes 2023-04-05 04:56:29.000000000 +0200
+++ new/Config-Tiny-2.30/Changes 2023-10-13 01:39:50.000000000 +0200
@@ -1,5 +1,14 @@
Revision history for Perl extension Config-Tiny:
+2.30 2023-10-12T17:17:08
+ - As of V 2.30, this module supports an array syntax for cases where
you wish to
+ assign an array of values to a key.
+ - See the new POD section called ARRAY SYNTAX.
+ - See also the updated question in the FAQ: What happens if a key is
repeated?
+ - See also the sample code in the Synopsis and in t/02.main.t and in
t/test.conf.
+ - In each case, search for the word greetings to find the new code
samples.
+ - This patch was kindly provided by Steven Schoch, with some additions
by Ron Savage.
+
2.29 2023-04-05T12:53:00
- Edit to remove Test::Pod from TEST_REQUIRES in Makefile.PL, again.
Thanx to Andrew Daugherity for the patch.
@@ -104,6 +113,7 @@
- Add MANIFEST.SKIP, Changelog.ini, Build.PL, META.json.
- Add an FAQ to the docs.
- Clean up the docs.
+ - As of this version, maintanence is by Ron Savage.
2.14 Thu Mar 24 12:00:00 2011
- Resolved #63080: module can write multiline values but not read them
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Config-Tiny-2.29/META.json
new/Config-Tiny-2.30/META.json
--- old/Config-Tiny-2.29/META.json 2023-04-05 04:59:53.000000000 +0200
+++ new/Config-Tiny-2.30/META.json 2023-10-13 01:44:22.000000000 +0200
@@ -4,7 +4,7 @@
"Adam Kennedy <[email protected]>"
],
"dynamic_config" : 1,
- "generated_by" : "ExtUtils::MakeMaker version 7.62, CPAN::Meta::Converter
version 2.150010",
+ "generated_by" : "ExtUtils::MakeMaker version 7.70, CPAN::Meta::Converter
version 2.150010",
"license" : [
"perl_5"
],
@@ -59,6 +59,6 @@
"web" : "https://github.com/ronsavage/Config-Tiny"
}
},
- "version" : "2.29",
+ "version" : "2.30",
"x_serialization_backend" : "JSON::PP version 4.06"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Config-Tiny-2.29/META.yml
new/Config-Tiny-2.30/META.yml
--- old/Config-Tiny-2.29/META.yml 2023-04-05 04:59:53.000000000 +0200
+++ new/Config-Tiny-2.30/META.yml 2023-10-13 01:44:22.000000000 +0200
@@ -7,7 +7,7 @@
configure_requires:
ExtUtils::MakeMaker: '0'
dynamic_config: 1
-generated_by: 'ExtUtils::MakeMaker version 7.62, CPAN::Meta::Converter version
2.150010'
+generated_by: 'ExtUtils::MakeMaker version 7.70, CPAN::Meta::Converter version
2.150010'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -27,5 +27,5 @@
bugtracker: https://github.com/ronsavage/Config-Tiny/issues
license: http://opensource.org/licenses/Perl
repository: https://github.com/ronsavage/Config-Tiny.git
-version: '2.29'
+version: '2.30'
x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Config-Tiny-2.29/lib/Config/Tiny.pm
new/Config-Tiny-2.30/lib/Config/Tiny.pm
--- old/Config-Tiny-2.29/lib/Config/Tiny.pm 2023-04-05 04:59:51.000000000
+0200
+++ new/Config-Tiny-2.30/lib/Config/Tiny.pm 2023-10-13 01:44:21.000000000
+0200
@@ -7,7 +7,7 @@
# Warning: There is another version line, in t/02.main.t.
-our $VERSION = '2.29';
+our $VERSION = '2.30';
BEGIN {
$Config::Tiny::errstr = '';
@@ -84,6 +84,14 @@
if ( /^\s*([^=]+?)\s*=\s*(.*?)\s*$/ )
{
+ if ( substr($1, -2) eq '[]' )
+ {
+ my $k = substr $1, 0, -2;
+ $self->{$ns}->{$k} ||= [];
+ return $self -> _error ("Can't mix arrays and
scalars at line $counter" ) unless ref $self->{$ns}->{$k} eq 'ARRAY';
+ push @{$self->{$ns}->{$k}}, $2;
+ next;
+ }
$self->{$ns}->{$1} = $2;
next;
@@ -144,6 +152,13 @@
{
return $self->_error("Illegal newlines in property
'$section.$property'") if $block->{$property} =~ /(?:\012|\015)/s;
+ if (ref $block->{$property} eq 'ARRAY') {
+ for my $element ( @{$block->{$property}} )
+ {
+ $contents .= "${property}[]=$element\n";
+ }
+ next;
+ }
$contents .= "$property=$block->{$property}\n";
}
}
@@ -174,8 +189,10 @@
[section]
one=twp
+ greetings[]=Hello
three= four
Foo =Bar
+ greetings[]=World!
empty=
# In your program
@@ -245,6 +262,8 @@
var1=value1
var2=value2
+But see also ARRAY SYNTAX just below.
+
If a property is outside of a section at the beginning of a file, it will
be assigned to the C<"root section">, available at C<$Config-E<gt>{_}>.
@@ -256,6 +275,95 @@
to keep the human elements of a config when writing back, upgrade to
something better, this module is not for you.
+=head1 ARRAY SYNTAX
+
+=head2 Basic Syntax
+
+As of V 2.30, this module supports the case of a key having an array of values.
+
+Sample data (copied from t/test.conf):
+
+ root=something
+
+ [section]
+ greetings[]=Hello
+ one=two
+ Foo=Bar
+ greetings[]=World!
+ this=Your Mother!
+ blank=
+
+ [Section Two]
+ something else=blah
+ remove = whitespace
+
+Note specifically that the key name greetings has the empty bracket pair [] as
a suffix.
+This tells the code that it is not to overwrite the 1st value with the 2nd
value, but
+rather to push these values onto a stack called 'greetings'.
+
+Note also that you could have used:
+
+ [section]
+ greetings[]=Hello
+ greetings[]=World!
+ one=two
+ Foo=Bar
+ this=Your Mother!
+ blank=
+
+Clearly, the 2 lines using greetings[] do not have to be side-by-side.
+
+If you use e.g. Data::Dumper::Concise to give you a Dumper() function (not
method), then
+'say Dumper($Config)' the output will look like:
+
+ bless( {
+ "Section Two" => {
+ remove => "whitespace",
+ "something else" => "blah",
+ },
+ _ => {
+ root => "something",
+ },
+ section => {
+ Foo => "Bar",
+ blank => "",
+ greetings => [
+ "Hello",
+ "World!",
+ ],
+ one => "two",
+ this => "Your Mother!",
+ },
+ }, 'Config::Tiny' )
+
+You can see this structure in t/02.main.t starting at line 45. Observe too
that the key names are
+reported in alphabetical order (by the module Data::Dumper::Concise) despite
the differing order
+in the setting of these keys, and that the array syntax result is that
greetings has an array
+for a value.
+
+To access these values, use code like this:
+
+ Dumper($Config);
+ Dumper($Config->{section});
+ Dumper($Config->{section}->{greetings});
+ Dumper($Config->{section}->{greetings}->[0]);
+ Dumper($Config->{section}->{greetings}->[1]);
+ Dumper(ref $Config);
+
+=head2 Warning
+
+$Config is a blessed value, which means it is accessed differently than if it
was
+a hash ref. The latter could be accessed as:
+
+ Dumper($$Config{section}{greetings}); # Don't do this for blessed
values!
+
+Finally, if a hash ref rather than a blessed value, you could also use, as
above:
+
+ Dumper($Config->{section}->{greetings}); # Don't do this for blessed
values!
+
+My (Ron Savage) personal preference for hashrefs is the one without the gross
'->' chars,
+but that requires you to double up the initial $ character (which I hope you
noticed!).
+
=head1 METHODS
=head2 errstr()
@@ -324,9 +432,16 @@
=head2 What happens if a key is repeated?
-The last value is retained, overwriting any previous values.
+Case 1: The last value is retained, overwriting any previous values.
-See t/06.repeat.key.t.
+See t/06.repeat.key.t for sample code.
+
+Case 2: However, by using the new array syntax, as of V 2.30, you can assign a
set of
+values to a key.
+
+For details, see the L</ARRAY SYNTAX> section above for sample code.
+
+See t/test.conf for sample data.
=head2 Why can't I put comments at the ends of lines?
@@ -489,3 +604,4 @@
LICENSE file included with this module.
=cut
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Config-Tiny-2.29/t/02.main.t
new/Config-Tiny-2.30/t/02.main.t
--- old/Config-Tiny-2.29/t/02.main.t 2023-04-05 04:48:41.000000000 +0200
+++ new/Config-Tiny-2.30/t/02.main.t 2023-10-13 01:15:05.000000000 +0200
@@ -17,7 +17,7 @@
# Warning: There is another version line, in lib/Config/Tiny.pm.
-our $VERSION = '2.29';
+our $VERSION = '2.30';
# --------------------
@@ -47,10 +47,14 @@
root => 'something',
},
section => {
- one => 'two',
Foo => 'Bar',
- this => 'Your Mother!',
blank => '',
+ greetings => [
+ "Hello",
+ "World!",
+ ],
+ one => 'two',
+ this => 'Your Mother!',
},
'Section Two' => {
'something else' => 'blah',
@@ -175,3 +179,4 @@
'errstr() returns expected error',
);
}
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Config-Tiny-2.29/t/test.conf
new/Config-Tiny-2.30/t/test.conf
--- old/Config-Tiny-2.29/t/test.conf 2021-08-16 08:44:24.000000000 +0200
+++ new/Config-Tiny-2.30/t/test.conf 2023-10-13 01:15:24.000000000 +0200
@@ -1,11 +1,14 @@
root=something
[section]
+greetings[]=Hello
one=two
Foo=Bar
+greetings[]=World!
this=Your Mother!
blank=
[Section Two]
something else=blah
- remove = whitespace
\ No newline at end of file
+ remove = whitespace
+