Hello community,
here is the log from the commit of package perl-XML-LibXML-Simple for
openSUSE:Factory checked in at 2015-04-22 01:10:03
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-XML-LibXML-Simple (Old)
and /work/SRC/openSUSE:Factory/.perl-XML-LibXML-Simple.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-XML-LibXML-Simple"
Changes:
--------
---
/work/SRC/openSUSE:Factory/perl-XML-LibXML-Simple/perl-XML-LibXML-Simple.changes
2014-07-29 16:47:57.000000000 +0200
+++
/work/SRC/openSUSE:Factory/.perl-XML-LibXML-Simple.new/perl-XML-LibXML-Simple.changes
2015-04-22 01:10:04.000000000 +0200
@@ -1,0 +2,16 @@
+Tue Apr 14 20:37:53 UTC 2015 - [email protected]
+
+- updated to 0.95
+ see /usr/share/doc/packages/perl-XML-LibXML-Simple/ChangeLog
+
+ version 0.95: Mon Dec 22 08:19:53 CET 2014
+
+ Fixes:
+ - content-key collapse did not work with any key value of 0.
+
+ Improvements:
+ - doc: be clear that an XML::LibXML node can be used as source
+ for XMLin as well [Salve J. Nilsen]
+ - doc: cleaner SYNOPSIS, minor reorganisation.
+
+-------------------------------------------------------------------
Old:
----
XML-LibXML-Simple-0.94.tar.gz
New:
----
XML-LibXML-Simple-0.95.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-XML-LibXML-Simple.spec ++++++
--- /var/tmp/diff_new_pack.WZCitd/_old 2015-04-22 01:10:05.000000000 +0200
+++ /var/tmp/diff_new_pack.WZCitd/_new 2015-04-22 01:10:05.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package perl-XML-LibXML-Simple
#
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX 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,7 +17,7 @@
Name: perl-XML-LibXML-Simple
-Version: 0.94
+Version: 0.95
Release: 0
%define cpan_name XML-LibXML-Simple
Summary: XML::LibXML clone of XML::Simple::XMLin()
++++++ XML-LibXML-Simple-0.94.tar.gz -> XML-LibXML-Simple-0.95.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/XML-LibXML-Simple-0.94/ChangeLog
new/XML-LibXML-Simple-0.95/ChangeLog
--- old/XML-LibXML-Simple-0.94/ChangeLog 2014-06-07 22:39:27.000000000
+0200
+++ new/XML-LibXML-Simple-0.95/ChangeLog 2014-12-22 08:20:35.000000000
+0100
@@ -1,6 +1,16 @@
=== version history for XML::LibXML::Simple
+version 0.95: Mon Dec 22 08:19:53 CET 2014
+
+ Fixes:
+ - content-key collapse did not work with any key value of 0.
+
+ Improvements:
+ - doc: be clear that an XML::LibXML node can be used as source
+ for XMLin as well [Salve J. Nilsen]
+ - doc: cleaner SYNOPSIS, minor reorganisation.
+
version 0.94: Sat Jun 7 22:39:23 CEST 2014
Improvements:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/XML-LibXML-Simple-0.94/META.json
new/XML-LibXML-Simple-0.95/META.json
--- old/XML-LibXML-Simple-0.94/META.json 2014-06-07 22:39:29.000000000
+0200
+++ new/XML-LibXML-Simple-0.95/META.json 2014-12-22 08:20:36.000000000
+0100
@@ -39,5 +39,5 @@
}
},
"release_status" : "stable",
- "version" : "0.94"
+ "version" : "0.95"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/XML-LibXML-Simple-0.94/META.yml
new/XML-LibXML-Simple-0.95/META.yml
--- old/XML-LibXML-Simple-0.94/META.yml 2014-06-07 22:39:29.000000000 +0200
+++ new/XML-LibXML-Simple-0.95/META.yml 2014-12-22 08:20:35.000000000 +0100
@@ -21,4 +21,4 @@
File::Slurp::Tiny: 0
Test::More: 0.54
XML::LibXML: 1.64
-version: 0.94
+version: 0.95
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/XML-LibXML-Simple-0.94/Makefile.PL
new/XML-LibXML-Simple-0.95/Makefile.PL
--- old/XML-LibXML-Simple-0.94/Makefile.PL 2014-06-07 22:39:27.000000000
+0200
+++ new/XML-LibXML-Simple-0.95/Makefile.PL 2014-12-22 08:19:40.000000000
+0100
@@ -4,7 +4,7 @@
WriteMakefile
( NAME => 'XML::LibXML::Simple'
- , VERSION => '0.94'
+ , VERSION => '0.95'
, PREREQ_PM =>
{ XML::LibXML => 1.64
, Test::More => 0.54
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/XML-LibXML-Simple-0.94/README
new/XML-LibXML-Simple-0.95/README
--- old/XML-LibXML-Simple-0.94/README 2014-06-07 22:39:28.000000000 +0200
+++ new/XML-LibXML-Simple-0.95/README 2014-12-22 08:19:40.000000000 +0100
@@ -1,5 +1,5 @@
-=== README for XML-LibXML-Simple version 0.94
-= Generated on Sat Jun 7 22:39:28 2014 by OODoc 2.01
+=== README for XML-LibXML-Simple version 0.95
+= Generated on Mon Dec 22 08:19:40 2014 by OODoc 2.01
There are various ways to install this module:
@@ -9,16 +9,16 @@
(2) if you use Windows, have a look at http://ppm.activestate.com/
(3) if you have downloaded this module manually (as root/administrator)
- gzip -d XML-LibXML-Simple-0.94.tar.gz
- tar -xf XML-LibXML-Simple-0.94.tar
- cd XML-LibXML-Simple-0.94
+ gzip -d XML-LibXML-Simple-0.95.tar.gz
+ tar -xf XML-LibXML-Simple-0.95.tar
+ cd XML-LibXML-Simple-0.95
perl Makefile.PL
make # optional
make test # optional
make install
For usage, see the included manual-pages or
- http://search.cpan.org/dist/XML-LibXML-Simple-0.94/
+ http://search.cpan.org/dist/XML-LibXML-Simple-0.95/
Please report problems to
http://rt.cpan.org/Dist/Display.html?Queue=XML-LibXML-Simple
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/XML-LibXML-Simple-0.94/lib/XML/LibXML/Simple.pm
new/XML-LibXML-Simple-0.95/lib/XML/LibXML/Simple.pm
--- old/XML-LibXML-Simple-0.94/lib/XML/LibXML/Simple.pm 2014-06-07
22:39:28.000000000 +0200
+++ new/XML-LibXML-Simple-0.95/lib/XML/LibXML/Simple.pm 2014-12-22
08:20:35.000000000 +0100
@@ -4,7 +4,7 @@
# Pod stripped from pm file by OODoc 2.01.
package XML::LibXML::Simple;
use vars '$VERSION';
-$VERSION = '0.94';
+$VERSION = '0.95';
use base 'Exporter';
@@ -23,7 +23,7 @@
use Data::Dumper; #to be removed
-my %known_opts = map { ($_ => 1) }
+my %known_opts = map +($_ => 1),
qw(keyattr keeproot forcecontent contentkey noattr searchpath
forcearray grouptags nsexpand normalisespace normalizespace
valueattr nsstrip parser parseropts);
@@ -31,6 +31,7 @@
my @DefKeyAttr = qw(name key id);
my $DefContentKey = qq(content);
+#-------------
sub new(@)
{ my $class = shift;
@@ -44,6 +45,7 @@
$self;
}
+#-------------
sub XMLin
{ my $self = @_ > 1 && UNIVERSAL::isa($_[0], __PACKAGE__) ? shift
@@ -454,7 +456,9 @@
# first go through the values, checking that they are fit to collapse
foreach my $v (values %out)
- { next if ref $v eq 'HASH' && keys %$v == 1 && $v->{$contentkey};
+ { next if !defined $v;
+ next if ref $v eq 'HASH' && keys %$v == 1 && exists $v->{$contentkey};
+ next if ref $v eq 'HASH' && !keys %$v;
return \%out;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/XML-LibXML-Simple-0.94/lib/XML/LibXML/Simple.pod
new/XML-LibXML-Simple-0.95/lib/XML/LibXML/Simple.pod
--- old/XML-LibXML-Simple-0.94/lib/XML/LibXML/Simple.pod 2014-06-07
22:39:28.000000000 +0200
+++ new/XML-LibXML-Simple-0.95/lib/XML/LibXML/Simple.pod 2014-12-22
08:20:35.000000000 +0100
@@ -11,14 +11,18 @@
=head1 SYNOPSIS
+ my $xml = ...; # filename, fh, string, or XML::LibXML-node
+
+Imperative:
+
use XML::LibXML::Simple qw(XMLin);
- my $xml = XMLin <xml file or string>, OPTIONS;
+ my $data = XMLin $xml, %options;
Or the Object Oriented way:
use XML::LibXML::Simple ();
- my $xs = XML::LibXML::Simple->new(OPTIONS);
- my $ref = $xs->XMLin(<xml file or string>, OPTIONS);
+ my $xs = XML::LibXML::Simple->new(%options);
+ my $data = $xs->XMLin($xml, %options);
=head1 DESCRIPTION
@@ -62,37 +66,7 @@
=head1 DETAILS
-=head2 Differences with XML::Simple
-
-In general, the output and the options are equivalent, although this
-module has some differences with XML::Simple to be aware of.
-
-=over 4
-
-=item only L<XMLin()|XML::LibXML::Simple/"Translators"> is supported
-
-If you want to write XML then use a schema (for instance with
-XML::Compile). Do not attempt to create XML by hand! If you still
-think you need it, then have a look at XMLout() as implemented by
-XML::Simple or any of a zillion template systems.
-
-=item no "variables" option
-
-IMO, you should use a templating system if you want variables filled-in
-in the input: it is not a task for this module.
-
-=item empty elements are not removed
-
-Being empty has a meaning which should not be ignored.
-
-=item ForceArray options
-
-There are a few small differences in the result of the C<forcearray> option,
-because XML::Simple seems to behave inconsequently.
-
-=back
-
-=head2 Parameter XML-DATA
+=head2 Parameter $xmldata
As first parameter to L<XMLin()|XML::LibXML::Simple/"Translators"> must
provide the XML message to be
translated into a Perl structure. Choose one of the following:
@@ -105,7 +79,7 @@
file in each directory in the SearchPath (see OPTIONS below) and in the
current directory. eg:
- $ref = XMLin('/etc/params.xml');
+ $data = XMLin('/etc/params.xml', %options);
Note, the filename C<< - >> (dash) can be used to parse from STDIN.
@@ -116,25 +90,31 @@
but with the extension '.xml'. Note: if you wish to specify options, you
must specify the value 'undef'. eg:
- $ref = XMLin(undef, ForceArray => 1);
+ $data = XMLin(undef, ForceArray => 1);
=item A string of XML
A string containing XML (recognised by the presence of '<' and '>' characters)
will be parsed directly. eg:
- $ref = XMLin('<opt username="bob" password="flurp" />');
+ $data = XMLin('<opt username="bob" password="flurp" />', %options);
=item An IO::Handle object
-An IO::Handle object will be read to EOF and its contents parsed. eg:
+In this case, XML::LibXML::Parser will read the XML data directly from
+the provided file.
- $fh = IO::File->new('/etc/params.xml');
- $ref = XMLin($fh);
+ $fh = IO::File->new('/etc/params.xml');
+ $data = XMLin($fh, %options);
+
+=item An XML::LibXML::Document or ::Element
+
+[Not available in XML::Simple] When you have a pre-parsed XML::LibXML
+node, you can pass that.
=back
-=head2 OPTIONS
+=head2 Parameter %options
L<XML::LibXML::Simple|XML::LibXML::Simple> supports most options defined by
XML::Simple, so
the interface is quite compatible. Minor changes apply. This explanation
@@ -685,11 +665,43 @@
whitespace will be lost. If you need to work with mixed content, then
XML::Simple is not the right tool for your job - check out the next section.
+=head2 Differences to XML::Simple
+
+In general, the output and the options are equivalent, although this
+module has some differences with XML::Simple to be aware of.
+
+=over 4
+
+=item only L<XMLin()|XML::LibXML::Simple/"Translators"> is supported
+
+If you want to write XML then use a schema (for instance with
+XML::Compile). Do not attempt to create XML by hand! If you still
+think you need it, then have a look at XMLout() as implemented by
+XML::Simple or any of a zillion template systems.
+
+=item no "variables" option
+
+IMO, you should use a templating system if you want variables filled-in
+in the input: it is not a task for this module.
+
+=item empty elements are not removed
+
+Being empty has a meaning which should not be ignored.
+
+=item ForceArray options
+
+There are a few small differences in the result of the C<forcearray> option,
+because XML::Simple seems to behave inconsequently.
+
+=back
+
=head1 SEE ALSO
-L<XML::Compile> for processing XML when a schema is available
+L<XML::Compile> for processing XML when a schema is available. When you
+have a schema, the data and structure of your message get validated.
-L<XML::Simple>, the SAX and original implementation
+L<XML::Simple>, the original implementation which interface is followed
+as closely as possible.
=head1 COPYRIGHTS