r75016 - in /trunk/libxml-libxml-simple-perl: ChangeLog META.yml Makefile.PL README debian/changelog debian/control debian/copyright debian/rules debian/source/local-options lib/XML/LibXML/Simple.pm lib/XML/LibXML/Simple.pod
ansgar at users.alioth.debian.org
ansgar at users.alioth.debian.org
Thu Jun 2 11:07:01 UTC 2011
Author: ansgar
Date: Thu Jun 2 11:06:51 2011
New Revision: 75016
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=75016
Log:
* Team upload.
* New upstream release.
* debian/control, debian/rules: Remove quilt references. Not needed with
source format 3.0 (quilt).
* debian/copyright: Update for new upstream release; refer to GPL-1; refer
to "Debian systems" instead of "Debian GNU/Linux systems".
* debian/control: Mention module name in description.
* Bump Standards-Version to 3.9.2 (no changes).
Added:
trunk/libxml-libxml-simple-perl/debian/source/local-options
Modified:
trunk/libxml-libxml-simple-perl/ChangeLog
trunk/libxml-libxml-simple-perl/META.yml
trunk/libxml-libxml-simple-perl/Makefile.PL
trunk/libxml-libxml-simple-perl/README
trunk/libxml-libxml-simple-perl/debian/changelog
trunk/libxml-libxml-simple-perl/debian/control
trunk/libxml-libxml-simple-perl/debian/copyright
trunk/libxml-libxml-simple-perl/debian/rules
trunk/libxml-libxml-simple-perl/lib/XML/LibXML/Simple.pm
trunk/libxml-libxml-simple-perl/lib/XML/LibXML/Simple.pod
Modified: trunk/libxml-libxml-simple-perl/ChangeLog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-libxml-simple-perl/ChangeLog?rev=75016&op=diff
==============================================================================
--- trunk/libxml-libxml-simple-perl/ChangeLog (original)
+++ trunk/libxml-libxml-simple-perl/ChangeLog Thu Jun 2 11:06:51 2011
@@ -1,5 +1,10 @@
=== version history for XML::LibXML::Simple
+
+version 0.15: Thu Apr 28 10:22:34 CEST 2011
+ Fixes:
+ - parser object recreated each time, because it cannot be
+ reused (any more?). [Didier Brun]
version 0.14: Fri Jul 16 11:17:49 CEST 2010
Fixes:
Modified: trunk/libxml-libxml-simple-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-libxml-simple-perl/META.yml?rev=75016&op=diff
==============================================================================
--- trunk/libxml-libxml-simple-perl/META.yml (original)
+++ trunk/libxml-libxml-simple-perl/META.yml Thu Jun 2 11:06:51 2011
@@ -1,17 +1,25 @@
--- #YAML:1.0
-name: XML-LibXML-Simple
-version: 0.14
-abstract: XML::LibXML based XML::Simple clone
-license: perl
-author:
+name: XML-LibXML-Simple
+version: 0.15
+abstract: XML::LibXML based XML::Simple clone
+author:
- Mark Overmeer
-generated_by: ExtUtils::MakeMaker version 6.42
-distribution_type: module
-requires:
- File::Slurp: 0
- Test::More: 0.54
- Test::Pod: 1.00
- XML::LibXML: 1.64
+license: perl
+distribution_type: module
+configure_requires:
+ ExtUtils::MakeMaker: 0
+build_requires:
+ ExtUtils::MakeMaker: 0
+requires:
+ File::Slurp: 0
+ Test::More: 0.54
+ Test::Pod: 1.00
+ XML::LibXML: 1.64
+no_index:
+ directory:
+ - t
+ - inc
+generated_by: ExtUtils::MakeMaker version 6.56
meta-spec:
- url: http://module-build.sourceforge.net/META-spec-v1.3.html
- version: 1.3
+ url: http://module-build.sourceforge.net/META-spec-v1.4.html
+ version: 1.4
Modified: trunk/libxml-libxml-simple-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-libxml-simple-perl/Makefile.PL?rev=75016&op=diff
==============================================================================
--- trunk/libxml-libxml-simple-perl/Makefile.PL (original)
+++ trunk/libxml-libxml-simple-perl/Makefile.PL Thu Jun 2 11:06:51 2011
@@ -4,7 +4,7 @@
WriteMakefile
( NAME => 'XML::LibXML::Simple'
- , VERSION => '0.14'
+ , VERSION => '0.15'
, PREREQ_PM =>
{ XML::LibXML => 1.64
, Test::More => 0.54
Modified: trunk/libxml-libxml-simple-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-libxml-simple-perl/README?rev=75016&op=diff
==============================================================================
--- trunk/libxml-libxml-simple-perl/README (original)
+++ trunk/libxml-libxml-simple-perl/README Thu Jun 2 11:06:51 2011
@@ -1,5 +1,5 @@
-=== README for XML-LibXML-Simple version 0.13
-= Generated on Fri Jul 16 11:17:58 2010 by OODoc 1.06
+=== README for XML-LibXML-Simple version 0.15
+= Generated on Thu Apr 28 10:22:46 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.13.tar.gz
- tar -xf XML-LibXML-Simple-0.13.tar
- cd XML-LibXML-Simple-0.13
+ gzip -d XML-LibXML-Simple-0.15.tar.gz
+ tar -xf XML-LibXML-Simple-0.15.tar
+ cd XML-LibXML-Simple-0.15
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.13/
+ http://search.cpan.org/dist/XML-LibXML-Simple-0.15/
Please report problems to
http://rt.cpan.org/Dist/Display.html?Queue=XML-LibXML-Simple
Modified: trunk/libxml-libxml-simple-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-libxml-simple-perl/debian/changelog?rev=75016&op=diff
==============================================================================
--- trunk/libxml-libxml-simple-perl/debian/changelog (original)
+++ trunk/libxml-libxml-simple-perl/debian/changelog Thu Jun 2 11:06:51 2011
@@ -1,3 +1,16 @@
+libxml-libxml-simple-perl (0.15-1) unstable; urgency=low
+
+ * Team upload.
+ * New upstream release.
+ * debian/control, debian/rules: Remove quilt references. Not needed with
+ source format 3.0 (quilt).
+ * debian/copyright: Update for new upstream release; refer to GPL-1; refer
+ to "Debian systems" instead of "Debian GNU/Linux systems".
+ * debian/control: Mention module name in description.
+ * Bump Standards-Version to 3.9.2 (no changes).
+
+ -- Ansgar Burchardt <ansgar at debian.org> Thu, 02 Jun 2011 13:04:09 +0200
+
libxml-libxml-simple-perl (0.14-1) unstable; urgency=low
[ Danai SAE-HAN ]
Modified: trunk/libxml-libxml-simple-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-libxml-simple-perl/debian/control?rev=75016&op=diff
==============================================================================
--- trunk/libxml-libxml-simple-perl/debian/control (original)
+++ trunk/libxml-libxml-simple-perl/debian/control Thu Jun 2 11:06:51 2011
@@ -1,11 +1,11 @@
Source: libxml-libxml-simple-perl
Section: perl
Priority: optional
-Build-Depends: debhelper (>= 8), quilt (>= 0.48-2~), libfile-slurp-perl, libxml-libxml-perl (>= 1.64), libtest-pod-perl (>= 1.00)
+Build-Depends: debhelper (>= 8), libfile-slurp-perl, libxml-libxml-perl (>= 1.64), libtest-pod-perl (>= 1.00)
Build-Depends-Indep: perl
Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
Uploaders: Danai SAE-HAN (ééè) <danai at debian.org>
-Standards-Version: 3.9.1
+Standards-Version: 3.9.2
Homepage: http://search.cpan.org/dist/XML-LibXML-Simple/
Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libxml-libxml-simple-perl/
Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/libxml-libxml-simple-perl/
@@ -13,7 +13,7 @@
Package: libxml-libxml-simple-perl
Architecture: all
Depends: ${misc:Depends}, ${perl:Depends}, libfile-slurp-perl, libxml-libxml-perl (>= 1.64)
-Description: A Perl module that uses the XML::LibXML parser for XML structures
- This module is a blunt rewrite of XML::Simple (by Grant McLean) to use the
- XML::LibXML parser for XML structures, where the original uses plain Perl
+Description: Perl module that uses the XML::LibXML parser for XML structures
+ XML::LibXML::Simple is a blunt rewrite of XML::Simple (by Grant McLean) to use
+ the XML::LibXML parser for XML structures, where the original uses plain Perl
or SAX parsers.
Modified: trunk/libxml-libxml-simple-perl/debian/copyright
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-libxml-simple-perl/debian/copyright?rev=75016&op=diff
==============================================================================
--- trunk/libxml-libxml-simple-perl/debian/copyright (original)
+++ trunk/libxml-libxml-simple-perl/debian/copyright Thu Jun 2 11:06:51 2011
@@ -1,10 +1,10 @@
Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=135
-Maintainer: Danai SAE-HAN (ééè) <danai at debian.org>
+Maintainer: Mark Overmeer <perl at overmeer.net>
Source: http://search.cpan.org/dist/XML-LibXML-Simple/
Name: XML-LibXML-Simple
Files: *
-Copyright: 2008-2010, Mark Overmeer <perl at overmeer.net>
+Copyright: 2008-2011, Mark Overmeer <perl at overmeer.net>
License: Artistic or GPL-1+
Files: debian/*
@@ -15,8 +15,8 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the Artistic License, which comes with Perl.
.
- On Debian GNU/Linux systems, the complete text of the Artistic License
- can be found in `/usr/share/common-licenses/Artistic'
+ On Debian systems, the complete text of the Artistic License can be
+ found in `/usr/share/common-licenses/Artistic'.
License: GPL-1+
This program is free software; you can redistribute it and/or modify
@@ -24,5 +24,5 @@
the Free Software Foundation; either version 1, or (at your option)
any later version.
.
- On Debian GNU/Linux systems, the complete text of the GNU General
- Public License can be found in `/usr/share/common-licenses/GPL'
+ On Debian systems, the complete text of version 1 of the GNU General
+ Public License can be found in `/usr/share/common-licenses/GPL-1'.
Modified: trunk/libxml-libxml-simple-perl/debian/rules
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-libxml-simple-perl/debian/rules?rev=75016&op=diff
==============================================================================
--- trunk/libxml-libxml-simple-perl/debian/rules (original)
+++ trunk/libxml-libxml-simple-perl/debian/rules Thu Jun 2 11:06:51 2011
@@ -1,4 +1,4 @@
#!/usr/bin/make -f
%:
- dh $@ --with quilt
+ dh $@
Added: trunk/libxml-libxml-simple-perl/debian/source/local-options
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-libxml-simple-perl/debian/source/local-options?rev=75016&op=file
==============================================================================
--- trunk/libxml-libxml-simple-perl/debian/source/local-options (added)
+++ trunk/libxml-libxml-simple-perl/debian/source/local-options Thu Jun 2 11:06:51 2011
@@ -1,0 +1,2 @@
+abort-on-upstream-changes
+unapply-patches
Modified: trunk/libxml-libxml-simple-perl/lib/XML/LibXML/Simple.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-libxml-simple-perl/lib/XML/LibXML/Simple.pm?rev=75016&op=diff
==============================================================================
--- trunk/libxml-libxml-simple-perl/lib/XML/LibXML/Simple.pm (original)
+++ trunk/libxml-libxml-simple-perl/lib/XML/LibXML/Simple.pm Thu Jun 2 11:06:51 2011
@@ -1,10 +1,10 @@
-# Copyrights 2008-2010 by Mark Overmeer.
+# Copyrights 2008-2011 by Mark Overmeer.
# For other contributors see ChangeLog.
# See the manual pages for details on the licensing terms.
-# Pod stripped from pm file by OODoc 1.06.
+# Pod stripped from pm file by OODoc 2.00.
package XML::LibXML::Simple;
use vars '$VERSION';
-$VERSION = '0.14';
+$VERSION = '0.15';
use base 'Exporter';
use strict;
@@ -61,14 +61,12 @@
}
*xml_in = \&XMLin;
-my $parser;
sub _get_xml($$)
{ my ($self, $source, $opts) = @_;
$source = $self->default_data_source($opts) unless defined $source;
$source = \*STDIN if $source eq '-';
-
- $parser ||= XML::LibXML->new;
+ my $parser = XML::LibXML->new;
my $xml
= UNIVERSAL::isa($source,'XML::LibXML::Document') ? $source
Modified: trunk/libxml-libxml-simple-perl/lib/XML/LibXML/Simple.pod
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-libxml-simple-perl/lib/XML/LibXML/Simple.pod?rev=75016&op=diff
==============================================================================
--- trunk/libxml-libxml-simple-perl/lib/XML/LibXML/Simple.pod (original)
+++ trunk/libxml-libxml-simple-perl/lib/XML/LibXML/Simple.pod Thu Jun 2 11:06:51 2011
@@ -28,9 +28,9 @@
=head2 Constructors
-XML::LibXML::Simple-E<gt>B<new>(OPTIONS)
-
=over 4
+
+=item XML::LibXML::Simple-E<gt>B<new>(OPTIONS)
Instantiate an object, which can be used to call L<XMLin()|XML::LibXML::Simple/"Translators"> on. You can
provide OPTIONS to this constructor (to be reused for each call to XMLin)
@@ -43,9 +43,9 @@
=head2 Translators
-$obj-E<gt>B<XMLin>(XML-DATA, OPTIONS)
-
=over 4
+
+=item $obj-E<gt>B<XMLin>(XML-DATA, OPTIONS)
For XML-DATA and descriptions of the OPTIONS see the L</DETAILS>
section of this manual page.
@@ -550,6 +550,149 @@
=back
+=head1 EXAMPLES
+
+When C<XMLin()> reads the following very simple piece of XML:
+
+ <opt username="testuser" password="frodo"></opt>
+
+it returns the following data structure:
+
+ {
+ 'username' => 'testuser',
+ 'password' => 'frodo'
+ }
+
+The identical result could have been produced with this alternative XML:
+
+ <opt username="testuser" password="frodo" />
+
+Or this (although see 'ForceArray' option for variations):
+
+ <opt>
+ <username>testuser</username>
+ <password>frodo</password>
+ </opt>
+
+Repeated nested elements are represented as anonymous arrays:
+
+ <opt>
+ <person firstname="Joe" lastname="Smith">
+ <email>joe at smith.com</email>
+ <email>jsmith at yahoo.com</email>
+ </person>
+ <person firstname="Bob" lastname="Smith">
+ <email>bob at smith.com</email>
+ </person>
+ </opt>
+
+ {
+ 'person' => [
+ {
+ 'email' => [
+ 'joe at smith.com',
+ 'jsmith at yahoo.com'
+ ],
+ 'firstname' => 'Joe',
+ 'lastname' => 'Smith'
+ },
+ {
+ 'email' => 'bob at smith.com',
+ 'firstname' => 'Bob',
+ 'lastname' => 'Smith'
+ }
+ ]
+ }
+
+Nested elements with a recognised key attribute are transformed (folded) from
+an array into a hash keyed on the value of that attribute (see the C<KeyAttr>
+option):
+
+ <opt>
+ <person key="jsmith" firstname="Joe" lastname="Smith" />
+ <person key="tsmith" firstname="Tom" lastname="Smith" />
+ <person key="jbloggs" firstname="Joe" lastname="Bloggs" />
+ </opt>
+
+ {
+ 'person' => {
+ 'jbloggs' => {
+ 'firstname' => 'Joe',
+ 'lastname' => 'Bloggs'
+ },
+ 'tsmith' => {
+ 'firstname' => 'Tom',
+ 'lastname' => 'Smith'
+ },
+ 'jsmith' => {
+ 'firstname' => 'Joe',
+ 'lastname' => 'Smith'
+ }
+ }
+ }
+
+The <anon> tag can be used to form anonymous arrays:
+
+ <opt>
+ <head><anon>Col 1</anon><anon>Col 2</anon><anon>Col 3</anon></head>
+ <data><anon>R1C1</anon><anon>R1C2</anon><anon>R1C3</anon></data>
+ <data><anon>R2C1</anon><anon>R2C2</anon><anon>R2C3</anon></data>
+ <data><anon>R3C1</anon><anon>R3C2</anon><anon>R3C3</anon></data>
+ </opt>
+
+ {
+ 'head' => [
+ [ 'Col 1', 'Col 2', 'Col 3' ]
+ ],
+ 'data' => [
+ [ 'R1C1', 'R1C2', 'R1C3' ],
+ [ 'R2C1', 'R2C2', 'R2C3' ],
+ [ 'R3C1', 'R3C2', 'R3C3' ]
+ ]
+ }
+
+Anonymous arrays can be nested to arbirtrary levels and as a special case, if
+the surrounding tags for an XML document contain only an anonymous array the
+arrayref will be returned directly rather than the usual hashref:
+
+ <opt>
+ <anon><anon>Col 1</anon><anon>Col 2</anon></anon>
+ <anon><anon>R1C1</anon><anon>R1C2</anon></anon>
+ <anon><anon>R2C1</anon><anon>R2C2</anon></anon>
+ </opt>
+
+ [
+ [ 'Col 1', 'Col 2' ],
+ [ 'R1C1', 'R1C2' ],
+ [ 'R2C1', 'R2C2' ]
+ ]
+
+Elements which only contain text content will simply be represented as a
+scalar. Where an element has both attributes and text content, the element
+will be represented as a hashref with the text content in the 'content' key
+(see the C<ContentKey> option):
+
+ <opt>
+ <one>first</one>
+ <two attr="value">second</two>
+ </opt>
+
+ {
+ 'one' => 'first',
+ 'two' => { 'attr' => 'value', 'content' => 'second' }
+ }
+
+Mixed content (elements which contain both text content and nested elements)
+will be not be represented in a useful way - element order and significant
+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.
+
+=head1 SEE ALSO
+
+L<XML::Compile> for processing XML when a schema is available
+
+L<XML::Simple>, the SAX and original implementation
+
=head1 COPYRIGHT
The interface design and large parts of the documentation were taken
More information about the Pkg-perl-cvs-commits
mailing list