Hello community,

here is the log from the commit of package perl-XML-LibXML-Simple for 
openSUSE:Factory checked in at 2017-12-19 10:44:29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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"

Tue Dec 19 10:44:29 2017 rev:12 rq:556881 version:0.99

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/perl-XML-LibXML-Simple/perl-XML-LibXML-Simple.changes
    2017-11-16 13:56:31.759375992 +0100
+++ 
/work/SRC/openSUSE:Factory/.perl-XML-LibXML-Simple.new/perl-XML-LibXML-Simple.changes
       2017-12-19 10:44:31.331266049 +0100
@@ -1,0 +2,15 @@
+Tue Dec 12 07:04:56 UTC 2017 - co...@suse.com
+
+- updated to 0.99
+   see /usr/share/doc/packages/perl-XML-LibXML-Simple/ChangeLog
+
+  version 0.99: Mon 11 Dec 12:53:14 CET 2017
+  
+       Changes:
+       - support SuppressEmpty.
+  
+       Improvements:
+       - typo
+         rt.cpan.org#123618 [Gregor Herrmann, Debian]
+
+-------------------------------------------------------------------

Old:
----
  XML-LibXML-Simple-0.98.tar.gz

New:
----
  XML-LibXML-Simple-0.99.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-XML-LibXML-Simple.spec ++++++
--- /var/tmp/diff_new_pack.59p6a3/_old  2017-12-19 10:44:32.003233610 +0100
+++ /var/tmp/diff_new_pack.59p6a3/_new  2017-12-19 10:44:32.003233610 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           perl-XML-LibXML-Simple
-Version:        0.98
+Version:        0.99
 Release:        0
 %define cpan_name XML-LibXML-Simple
 Summary:        XML::LibXML clone of XML::Simple::XMLin()

++++++ XML-LibXML-Simple-0.98.tar.gz -> XML-LibXML-Simple-0.99.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/XML-LibXML-Simple-0.98/ChangeLog 
new/XML-LibXML-Simple-0.99/ChangeLog
--- old/XML-LibXML-Simple-0.98/ChangeLog        2017-11-08 10:39:33.000000000 
+0100
+++ new/XML-LibXML-Simple-0.99/ChangeLog        2017-12-11 13:00:51.000000000 
+0100
@@ -1,6 +1,15 @@
 
 === version history for XML::LibXML::Simple
 
+version 0.99: Mon 11 Dec 12:53:14 CET 2017
+
+       Changes:
+       - support SuppressEmpty.
+
+       Improvements:
+       - typo
+         rt.cpan.org#123618 [Gregor Herrmann, Debian]
+
 version 0.98: Wed  8 Nov 10:38:35 CET 2017
 
        Improvements:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/XML-LibXML-Simple-0.98/META.json 
new/XML-LibXML-Simple-0.99/META.json
--- old/XML-LibXML-Simple-0.98/META.json        2017-11-08 10:39:34.000000000 
+0100
+++ new/XML-LibXML-Simple-0.99/META.json        2017-12-11 13:00:52.000000000 
+0100
@@ -39,5 +39,5 @@
       }
    },
    "release_status" : "stable",
-   "version" : "0.98"
+   "version" : "0.99"
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/XML-LibXML-Simple-0.98/META.yml 
new/XML-LibXML-Simple-0.99/META.yml
--- old/XML-LibXML-Simple-0.98/META.yml 2017-11-08 10:39:34.000000000 +0100
+++ new/XML-LibXML-Simple-0.99/META.yml 2017-12-11 13:00:52.000000000 +0100
@@ -21,4 +21,4 @@
   Scalar::Util: 0
   Test::More: 0.54
   XML::LibXML: 1.64
-version: 0.98
+version: 0.99
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/XML-LibXML-Simple-0.98/Makefile.PL 
new/XML-LibXML-Simple-0.99/Makefile.PL
--- old/XML-LibXML-Simple-0.98/Makefile.PL      2017-11-08 10:39:33.000000000 
+0100
+++ new/XML-LibXML-Simple-0.99/Makefile.PL      2017-12-11 13:00:51.000000000 
+0100
@@ -4,7 +4,7 @@
 
 WriteMakefile
  ( NAME                => 'XML::LibXML::Simple'
- , VERSION     => '0.98'
+ , VERSION     => '0.99'
  , 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.98/lib/XML/LibXML/Simple.pm 
new/XML-LibXML-Simple-0.99/lib/XML/LibXML/Simple.pm
--- old/XML-LibXML-Simple-0.98/lib/XML/LibXML/Simple.pm 2017-11-08 
10:39:34.000000000 +0100
+++ new/XML-LibXML-Simple-0.99/lib/XML/LibXML/Simple.pm 2017-12-11 
13:00:51.000000000 +0100
@@ -4,7 +4,7 @@
 # Pod stripped from pm file by OODoc 2.02.
 package XML::LibXML::Simple;
 use vars '$VERSION';
-$VERSION = '0.98';
+$VERSION = '0.99';
 
 use base 'Exporter';
 
@@ -26,7 +26,7 @@
 my %known_opts = map +($_ => 1),
   qw(keyattr keeproot forcecontent contentkey noattr searchpath
      forcearray grouptags nsexpand normalisespace normalizespace
-     valueattr nsstrip parser parseropts hooknodes);
+     valueattr nsstrip parser parseropts hooknodes suppressempty);
 
 my @default_attributes  = qw(name key id);
 my $default_content_key = 'content';
@@ -314,7 +314,9 @@
         if($hooks && (my $hook = $hooks->{$child->unique_key}))
              { $v = $hook->($child) }
         else { $v = $self->collapse($child, $opts) }
-        defined $v or next CHILD;
+
+               next CHILD
+               if ! defined $v && $opts->{suppressempty};
 
         my $name
           = $opts->{nsexpand} ? _expand_name($child)
@@ -376,6 +378,12 @@
         && exists $data{anon}
         && ref $data{anon} eq 'ARRAY';
 
+    # Suppress empty elements?
+    if(! keys %data && exists $opts->{suppressempty}) {
+               my $sup = $opts->{suppressempty};
+        return +(defined $sup && $sup eq '') ? '' : undef;
+    }
+
     # Roll up named elements with named nested 'value' attributes
     if(my $va = $opts->{valueattrlist})
     {   while(my($key, $val) = each %data)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/XML-LibXML-Simple-0.98/lib/XML/LibXML/Simple.pod 
new/XML-LibXML-Simple-0.99/lib/XML/LibXML/Simple.pod
--- old/XML-LibXML-Simple-0.98/lib/XML/LibXML/Simple.pod        2017-11-08 
10:39:34.000000000 +0100
+++ new/XML-LibXML-Simple-0.99/lib/XML/LibXML/Simple.pod        2017-12-11 
13:00:51.000000000 +0100
@@ -415,7 +415,7 @@
 
 =item KeyAttr => { list } I<# important>
 
-This alternative (and preferred) method of specifiying the key attributes
+This alternative (and preferred) method of specifying the key attributes
 allows more fine grained control over which elements are folded and on which
 attributes.  For example the option 'KeyAttr => { package => 'id' } will cause
 any package elements to be folded on the 'id' attribute.  No other elements
@@ -526,6 +526,15 @@
 will contain only the directory in which the script itself is located.
 Otherwise the default SearchPath will be empty.  
 
+=item SuppressEmpty => 1 | '' | undef
+
+[0.99] What to do with empty elements (no attributes and no content).  The
+default behaviour is to represent them as empty hashes.  Setting this
+option to a true value (eg: 1) will cause empty elements to be skipped
+altogether.  Setting the option to 'undef' or the empty string will
+cause empty elements to be represented as the undefined value or the
+empty string respectively.
+
 =item ValueAttr => [ names ] I<# handy>
 
 Use this option to deal elements which always have a single attribute and no
@@ -745,10 +754,6 @@
 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,


Reply via email to