r77397 - in /branches/upstream/libxml-libxml-simple-perl/current: ChangeLog META.yml Makefile.PL README lib/XML/LibXML/Simple.pm
carnil at users.alioth.debian.org
carnil at users.alioth.debian.org
Tue Jul 12 11:37:35 UTC 2011
Author: carnil
Date: Tue Jul 12 11:37:32 2011
New Revision: 77397
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=77397
Log:
[svn-upgrade] new version libxml-libxml-simple-perl (0.91)
Modified:
branches/upstream/libxml-libxml-simple-perl/current/ChangeLog
branches/upstream/libxml-libxml-simple-perl/current/META.yml
branches/upstream/libxml-libxml-simple-perl/current/Makefile.PL
branches/upstream/libxml-libxml-simple-perl/current/README
branches/upstream/libxml-libxml-simple-perl/current/lib/XML/LibXML/Simple.pm
Modified: branches/upstream/libxml-libxml-simple-perl/current/ChangeLog
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-libxml-simple-perl/current/ChangeLog?rev=77397&op=diff
==============================================================================
--- branches/upstream/libxml-libxml-simple-perl/current/ChangeLog (original)
+++ branches/upstream/libxml-libxml-simple-perl/current/ChangeLog Tue Jul 12 11:37:32 2011
@@ -1,5 +1,10 @@
=== version history for XML::LibXML::Simple
+
+version 0.91: Mon Jul 11 22:40:02 CEST 2011
+ Fixes:
+ - forcearray option with one element
+ rt.cpan.org#69336 [Matt W Johnson]
version 0.90: Wed Jun 15 10:20:48 CEST 2011
Fixes:
Modified: branches/upstream/libxml-libxml-simple-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-libxml-simple-perl/current/META.yml?rev=77397&op=diff
==============================================================================
--- branches/upstream/libxml-libxml-simple-perl/current/META.yml (original)
+++ branches/upstream/libxml-libxml-simple-perl/current/META.yml Tue Jul 12 11:37:32 2011
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: XML-LibXML-Simple
-version: 0.90
+version: 0.91
abstract: XML::LibXML based XML::Simple clone
author:
- Mark Overmeer
Modified: branches/upstream/libxml-libxml-simple-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-libxml-simple-perl/current/Makefile.PL?rev=77397&op=diff
==============================================================================
--- branches/upstream/libxml-libxml-simple-perl/current/Makefile.PL (original)
+++ branches/upstream/libxml-libxml-simple-perl/current/Makefile.PL Tue Jul 12 11:37:32 2011
@@ -4,7 +4,7 @@
WriteMakefile
( NAME => 'XML::LibXML::Simple'
- , VERSION => '0.90'
+ , VERSION => '0.91'
, PREREQ_PM =>
{ XML::LibXML => 1.64
, Test::More => 0.54
Modified: branches/upstream/libxml-libxml-simple-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-libxml-simple-perl/current/README?rev=77397&op=diff
==============================================================================
--- branches/upstream/libxml-libxml-simple-perl/current/README (original)
+++ branches/upstream/libxml-libxml-simple-perl/current/README Tue Jul 12 11:37:32 2011
@@ -1,5 +1,5 @@
-=== README for XML-LibXML-Simple version 0.90
-= Generated on Wed Jun 15 10:21:43 2011 by OODoc 2.00
+=== README for XML-LibXML-Simple version 0.91
+= Generated on Mon Jul 11 22:40:07 2011 by OODoc 2.00
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.90.tar.gz
- tar -xf XML-LibXML-Simple-0.90.tar
- cd XML-LibXML-Simple-0.90
+ gzip -d XML-LibXML-Simple-0.91.tar.gz
+ tar -xf XML-LibXML-Simple-0.91.tar
+ cd XML-LibXML-Simple-0.91
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.90/
+ http://search.cpan.org/dist/XML-LibXML-Simple-0.91/
Please report problems to
http://rt.cpan.org/Dist/Display.html?Queue=XML-LibXML-Simple
Modified: branches/upstream/libxml-libxml-simple-perl/current/lib/XML/LibXML/Simple.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-libxml-simple-perl/current/lib/XML/LibXML/Simple.pm?rev=77397&op=diff
==============================================================================
--- branches/upstream/libxml-libxml-simple-perl/current/lib/XML/LibXML/Simple.pm (original)
+++ branches/upstream/libxml-libxml-simple-perl/current/lib/XML/LibXML/Simple.pm Tue Jul 12 11:37:32 2011
@@ -4,7 +4,7 @@
# Pod stripped from pm file by OODoc 2.00.
package XML::LibXML::Simple;
use vars '$VERSION';
-$VERSION = '0.90';
+$VERSION = '0.91';
use base 'Exporter';
use strict;
@@ -154,15 +154,19 @@
$opt{searchpath} ||= [];
ref $opt{searchpath} eq 'ARRAY'
- or $opt{searchpath} = [ $opt{searchpath} ];
-
- my $fa = delete $opt{forcearray};
- my @fa = ref $fa eq 'ARRAY' ? @$fa : defined $fa ? $fa : ();
- $opt{forcearray_always} = (@fa==1 && !ref $fa[0] && $fa[0]);
- $opt{forcearray_regex} = [ grep {ref $_ eq 'Regexp'} @fa ];
-
- $opt{forcearray_elem} = {};
- $opt{forcearray_elem}{$_} = 1 for grep !ref $_, @fa;
+ or $opt{searchpath} = [ $opt{searchpath} ];
+
+ my $fa = delete $opt{forcearray} || 0;
+ my (@fa_regex, %fa_elem);
+ if(ref $fa)
+ { foreach (ref $fa eq 'ARRAY' ? @$fa : $fa)
+ { if(ref $_ eq 'Regexp') { push @fa_regex, $_ }
+ else { $fa_elem{$_} = 1 }
+ }
+ }
+ else { $opt{forcearray_always} = $fa }
+ $opt{forcearray_regex} = \@fa_regex;
+ $opt{forcearray_elem} = \%fa_elem;
# Special cleanup for {keyattr} which could be arrayref or hashref,
# which behave differently.
@@ -226,23 +230,16 @@
if(defined $d->{$k})
{ # Combine duplicate attributes into arrayref if required
- if(ref $d->{$k} eq 'ARRAY')
- { push @{$d->{$k}}, $v }
- else { $d->{$k} = [ $d->{$k}, $v ] }
- }
- elsif(ref $v eq 'ARRAY')
- { push @{$d->{$k}}, $v }
+ if(ref $d->{$k} eq 'ARRAY') { push @{$d->{$k}}, $v }
+ else { $d->{$k} = [ $d->{$k}, $v ] } }
+ elsif(ref $v eq 'ARRAY') { push @{$d->{$k}}, $v }
elsif(ref $v eq 'HASH'
&& $k ne $opts->{contentkey}
- && $opts->{forcearray_always})
- { push @{$d->{$k}}, $v }
+ && $opts->{forcearray_always}) { push @{$d->{$k}}, $v }
elsif($opts->{forcearray_elem}{$k}
|| grep {$k =~ $_} @{$opts->{forcearray_regex}}
- )
- { push @{$d->{$k}}, $v }
- else
- { $d->{$k} = $v;
- }
+ ) { push @{$d->{$k}}, $v }
+ else { $d->{$k} = $v }
$d->{$k};
}
More information about the Pkg-perl-cvs-commits
mailing list