Hello community,
here is the log from the commit of package perl-XML-Writer
checked in at Fri Feb 29 23:45:20 CET 2008.
--------
--- perl-XML-Writer/perl-XML-Writer.changes 2007-07-03 08:46:26.000000000 +0200
+++ perl-XML-Writer/perl-XML-Writer.changes 2008-02-28 10:39:50.000000000 +0100
@@ -1,0 +2,7 @@
+Thu Feb 28 10:23:16 CET 2008 - anicka@suse.cz
+
+- update to 0.604
+ * Patch from Andreas Koenig for lc(undef) warning in 5.11
+ * Include example code.
+
+-------------------------------------------------------------------
Old:
----
XML-Writer-0.603.tar.bz2
New:
----
XML-Writer-0.604.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-XML-Writer.spec ++++++
--- /var/tmp/diff_new_pack.lT8331/_old 2008-02-29 23:44:44.000000000 +0100
+++ /var/tmp/diff_new_pack.lT8331/_new 2008-02-29 23:44:44.000000000 +0100
@@ -1,7 +1,7 @@
#
-# spec file for package perl-XML-Writer (Version 0.603)
+# spec file for package perl-XML-Writer (Version 0.604)
#
-# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
@@ -10,14 +10,15 @@
# norootforbuild
+
Name: perl-XML-Writer
-Version: 0.603
+Version: 0.604
Release: 1
Requires: perl = %{perl_version}
-Autoreqprov: on
+AutoReqProv: on
Group: Development/Libraries/Perl
-License: Artistic License, GPL v2 or later
-URL: http://cpan.org/modules/by-module/XML/
+License: Artistic License; GPL v2 or later
+Url: http://cpan.org/modules/by-module/XML/
Summary: A Perl Extension for Writing XML Documents
Source: XML-Writer-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -59,43 +60,47 @@
/var/adm/perl-modules/%{name}
%changelog
-* Tue Jul 03 2007 - anicka@suse.cz
+* Thu Feb 28 2008 anicka@suse.cz
+- update to 0.604
+ * Patch from Andreas Koenig for lc(undef) warning in 5.11
+ * Include example code.
+* Tue Jul 03 2007 anicka@suse.cz
- update to 0.603
* Escape all necessary white space in attributes
-* Wed Dec 13 2006 - anicka@suse.cz
+* Wed Dec 13 2006 anicka@suse.cz
- update to 0.602
* Fix bugs in test case to avoid breaking with new Perls.
* Make test case work with older Perls, tested against 5.004
* Include pod syntax and coverage tests.
-* Thu Sep 14 2006 - anicka@suse.cz
+* Thu Sep 14 2006 anicka@suse.cz
- update to 0.601
* Don't modify list references passed as tag or attribute names
-* Wed Jan 25 2006 - mls@suse.de
+* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
-* Mon Aug 01 2005 - cthiel@suse.de
+* Mon Aug 01 2005 cthiel@suse.de
- update to version 0.600
- build as user
-* Thu Feb 17 2005 - mjancar@suse.cz
+* Thu Feb 17 2005 mjancar@suse.cz
- update to 0.530
-* Fri Aug 06 2004 - mjancar@suse.cz
+* Fri Aug 06 2004 mjancar@suse.cz
- update to 0.510
-* Tue Oct 14 2003 - ro@suse.de
+* Tue Oct 14 2003 ro@suse.de
- build on all versions
-* Tue Oct 14 2003 - ro@suse.de
+* Tue Oct 14 2003 ro@suse.de
- removed 'make test' when version of perl is v5.6.0 due to bug
that causes segfault
-* Fri Aug 22 2003 - mjancar@suse.cz
+* Fri Aug 22 2003 mjancar@suse.cz
- require the perl version we build with
-* Tue Jul 15 2003 - mjancar@suse.cz
+* Tue Jul 15 2003 mjancar@suse.cz
- adapt to perl-5.8.1
- use %%perl_process_packlist
-* Mon Jun 16 2003 - mjancar@suse.cz
+* Mon Jun 16 2003 mjancar@suse.cz
- fix filelist
-* Mon Jun 09 2003 - mjancar@suse.cz
+* Mon Jun 09 2003 mjancar@suse.cz
- don't package MANIFEST
-* Mon May 19 2003 - ro@suse.de
+* Mon May 19 2003 ro@suse.de
- remove perllocal.pod
-* Tue Jul 02 2002 - mls@suse.de
+* Tue Jul 02 2002 mls@suse.de
- remove race in .packlist generation
-* Thu Aug 16 2001 - rvasice@suse.cz
+* Thu Aug 16 2001 rvasice@suse.cz
- initial package release (version 0.4)
++++++ XML-Writer-0.603.tar.bz2 -> XML-Writer-0.604.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/XML-Writer-0.603/Changes new/XML-Writer-0.604/Changes
--- old/XML-Writer-0.603/Changes 2007-06-25 23:47:49.000000000 +0200
+++ new/XML-Writer-0.604/Changes 2008-02-21 01:51:34.000000000 +0100
@@ -1,5 +1,9 @@
Revision history for Perl extension XML::Writer.
+0.604 Thu Feb 21 00:42:06 GMT 2008
+ - Patch from Andreas Koenig for lc(undef) warning in 5.11 (#32874).
+ - Include example code.
+
0.603 Mon Jun 25 22:31:40 BST 2007
- Escape all necessary white space in attributes (#25499).
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/XML-Writer-0.603/examples/data-mode-sample.pl new/XML-Writer-0.604/examples/data-mode-sample.pl
--- old/XML-Writer-0.603/examples/data-mode-sample.pl 1970-01-01 01:00:00.000000000 +0100
+++ new/XML-Writer-0.604/examples/data-mode-sample.pl 2008-02-21 01:42:06.000000000 +0100
@@ -0,0 +1,21 @@
+#!/usr/bin/perl -w
+
+# Use DATA_MODE and DATA_INDENT to make data documents easier to read
+
+use strict;
+
+use XML::Writer;
+use IO::File;
+
+my $writer = new XML::Writer(DATA_MODE => 1, DATA_INDENT => 2);
+$writer->startTag("doc");
+$writer->startTag("x");
+$writer->dataElement("y", "Hello, world!");
+$writer->dataElement("y", "Hello, world!");
+$writer->endTag("x");
+$writer->startTag("x");
+$writer->dataElement("y", "Hello, world!");
+$writer->dataElement("y", "Hello, world!");
+$writer->endTag("x");
+$writer->endTag("doc");
+$writer->end();
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/XML-Writer-0.603/examples/directory-as-atom.pl new/XML-Writer-0.604/examples/directory-as-atom.pl
--- old/XML-Writer-0.603/examples/directory-as-atom.pl 1970-01-01 01:00:00.000000000 +0100
+++ new/XML-Writer-0.604/examples/directory-as-atom.pl 2008-02-21 01:42:06.000000000 +0100
@@ -0,0 +1,148 @@
+#!/usr/bin/perl -w
+
+# A full example that presents a directory as an Atom feed
+# It demonstrates namespace and formatting control.
+# Intended to productise the /junk convention.
+
+# Usage: directory-as-atom.pl <local directory> <public URL> [feed title] [feed subtitle]
+
+# e.g., directory-as-atom.pl /home/user/public_html/junk http://www.example.com/~user/junk/ >index.atom
+
+use strict;
+
+use DirHandle;
+use URI::URL;
+use DateTime;
+
+use XML::Writer;
+
+my ($dir, $base, $title, $subtitle) = @ARGV;
+
+defined($base) or die "Usage: directory-as-atom.pl <local directory> <public URL> [feed title] [feed subtitle]";
+
+$dir ||= '.';
+
+$title ||= '/junk/';
+$subtitle ||= 'ls -ltr $dir | head -10';
+
+
+my $uid = (stat($dir))[4];
+
+my $dh = new DirHandle($dir) || die "Unable to opendir $dir: $!";
+
+my @de;
+
+while(my $e = $dh->read()) {
+ # Skip dotfiles
+ next if ($e =~ /^\./);
+
+ my $n = "$dir/$e";
+
+ next unless (-f $n);
+
+ my ($mtime, $bytes) = (stat($n))[9,7];
+
+ my $desc; # undef, for now
+
+ if (defined($mtime)) {push(@de, [$e, $mtime, $desc, $bytes])};
+}
+
+undef($dh);
+
+# Sort into reverse date order...
+@de = sort {
+ $b->[1] <=> $a->[1];
+} @de;
+
+# ...take the most recent ten
+if (@de > 10) {
+ @de = @de[0..9];
+}
+
+# Constants for the namespace URIs
+my $ATOM = 'http://www.w3.org/2005/Atom';
+my $HTML = 'http://www.w3.org/1999/xhtml';
+my $XML = 'http://www.w3.org/XML/1998/namespace';
+
+sub toIsoDate($)
+{
+ my $t = shift;
+
+ my $d = DateTime->from_epoch(epoch => $t);
+ $d->set_time_zone('UTC');
+
+ return $d->iso8601 . "Z";
+}
+
+my $w = new XML::Writer(
+ # Use namespaces
+ NAMESPACES => 1,
+
+ # Write in data mode, with indentation
+ DATA_MODE => 1, DATA_INDENT => 1,
+
+ # Use specific namespace prefixes
+ PREFIX_MAP => {$ATOM => '', $HTML => 'html'},
+
+ # Force an xmlns:html declaration on the root element
+ FORCED_NS_DECLS => [$HTML],
+
+ # Encode text as UTF-8
+ ENCODING => 'utf-8'
+);
+
+$base = new URI::URL($base)->abs;
+
+my $feedUrl = new URI::URL('index.atom', $base);
+
+$w->xmlDecl();
+
+# Start the root element with an xml:base declaration
+$w->startTag([$ATOM, 'feed'], [$XML, 'base'] => $base);
+
+$w->dataElement([$ATOM, 'id'], $feedUrl->abs);
+
+# Mandatory Atom feed elements
+$w->dataElement([$ATOM, 'title'], $title);
+$w->dataElement([$ATOM, 'subtitle'], $subtitle);
+$w->dataElement('generator', 'Old-skool directory-based CMS');
+$w->emptyTag('link', 'rel' => 'self', 'href' => $feedUrl) if $feedUrl;
+$w->dataElement([$ATOM, 'updated'] => toIsoDate(time));
+
+# Find out the directory owner's name
+if (my ($name) = (getpwuid($uid))[0]) {
+ $w->startTag([$ATOM, 'author']);
+ $w->dataElement([$ATOM, 'name'], $name);
+ $w->endTag([$ATOM, 'author']);
+}
+
+# Write an entry for each file
+foreach (@de) {
+ my ($n, $mtime, $desc, $bytes) = @{$_};
+
+ my $url = url($n, $base)->abs->as_string;
+
+ $w->startTag([$ATOM, 'entry']);
+
+ $w->dataElement([$ATOM, 'title'], $n);
+ $w->dataElement([$ATOM, 'id'], $url);
+ $w->emptyTag([$ATOM, 'link'], 'href' => $n);
+ $w->dataElement([$ATOM, 'updated'], toIsoDate($mtime));
+
+ # Write atom:content as XHTML; turn off data mode
+ # to control whitespace inside the html:div element
+ $w->startTag([$ATOM, 'content'], 'type' => 'xhtml');
+ $w->startTag([$HTML, 'div']);
+ $w->setDataMode(0);
+ $w->dataElement([$HTML, 'code'], $n);
+ $w->characters(" - ${bytes} bytes");
+ $w->characters(" - ${desc}") if $desc;
+ $w->setDataMode(1);
+ $w->endTag([$HTML, 'div']);
+ $w->endTag([$ATOM, 'content']);
+
+ $w->endTag([$ATOM, 'entry']);
+}
+
+$w->endTag([$ATOM, 'feed']);
+$w->end();
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/XML-Writer-0.603/examples/double-escaping-example.pl new/XML-Writer-0.604/examples/double-escaping-example.pl
--- old/XML-Writer-0.603/examples/double-escaping-example.pl 1970-01-01 01:00:00.000000000 +0100
+++ new/XML-Writer-0.604/examples/double-escaping-example.pl 2008-02-21 01:42:06.000000000 +0100
@@ -0,0 +1,17 @@
+#!/usr/bin/perl -w
+
+# Demonstrate that ampersands are double-escaped
+
+# Even if your text looks like already-escaped XML, it will be escaped
+# again to make sure that the same text arrives at the other end.
+
+use strict;
+
+use XML::Writer;
+
+my $w = new XML::Writer();
+
+$w->startTag('doc');
+$w->characters('In HTML and XML, an ampersand must be escaped as &');
+$w->endTag('doc');
+$w->end();
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/XML-Writer-0.603/examples/namespace-prefixes.pl new/XML-Writer-0.604/examples/namespace-prefixes.pl
--- old/XML-Writer-0.603/examples/namespace-prefixes.pl 1970-01-01 01:00:00.000000000 +0100
+++ new/XML-Writer-0.604/examples/namespace-prefixes.pl 2008-02-21 01:42:06.000000000 +0100
@@ -0,0 +1,52 @@
+#!/usr/bin/perl -w
+
+# A skeleton Atom document with extensions, to show different
+# behaviour of namespaces and prefixes
+
+use strict;
+
+use XML::Writer;
+
+my $ATOM = 'http://www.w3.org/2005/Atom';
+my $EXT = 'http://www.example.com/feed-extension';
+my $EXT2 = 'http://www.example.com/feed-extension-2';
+my $EXT3 = 'http://www.example.com/feed-extension-3';
+
+my $w = new XML::Writer(
+ NAMESPACES => 1,
+ DATA_MODE => 1,
+
+ # Define prefixes for most of the namespaces
+ PREFIX_MAP => {
+ $ATOM => '',
+ $EXT => 'ext',
+ $EXT2 => 'ext2'
+ },
+
+ # Force a declaration for the first extension on the root element
+ FORCED_NS_DECLS => [$EXT]
+);
+
+
+$w->comment(' An Atom feed with namespace declarations ');
+
+$w->startTag([$ATOM, 'feed']);
+
+# The root element will include a declaration for its own namespace
+# and the contents of FORCED_NS_DECLS
+$w->dataElement([$ATOM, 'title'], "Feed Title");
+
+# This namespace has already been declared on the root as the default
+$w->dataElement([$EXT, 'example'], "true");
+
+# This namespace had its name defined but the declaration hasn't appeared yet.
+# It will be included on demand, on this element.
+$w->dataElement([$EXT2, 'definitely-an-example'], "true");
+
+# This namespace has no prefix defined - an artificial prefix will be
+# used (something like __NS1)
+$w->dataElement([$EXT3, 'most-definitely-an-example'], "true");
+
+$w->endTag([$ATOM, 'feed']);
+
+$w->end();
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/XML-Writer-0.603/examples/simple-xml.pl new/XML-Writer-0.604/examples/simple-xml.pl
--- old/XML-Writer-0.603/examples/simple-xml.pl 1970-01-01 01:00:00.000000000 +0100
+++ new/XML-Writer-0.604/examples/simple-xml.pl 2008-02-21 01:42:06.000000000 +0100
@@ -0,0 +1,19 @@
+#!/usr/bin/perl -w
+
+# Write a simple XML document to a file
+
+use strict;
+
+use XML::Writer;
+
+my $output;
+
+open($output, '>', 'output.xml') or die "Unable to open output file: $!";
+
+my $writer = new XML::Writer(OUTPUT => $output);
+$writer->startTag("greeting",
+ "class" => "simple");
+$writer->characters("Hello, world!");
+$writer->endTag("greeting");
+$writer->end();
+close($output) or die "Failed to close output file: $!";
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/XML-Writer-0.603/examples/writing-unicode.pl new/XML-Writer-0.604/examples/writing-unicode.pl
--- old/XML-Writer-0.603/examples/writing-unicode.pl 1970-01-01 01:00:00.000000000 +0100
+++ new/XML-Writer-0.604/examples/writing-unicode.pl 2008-02-21 01:42:06.000000000 +0100
@@ -0,0 +1,18 @@
+#!/usr/bin/perl -w
+
+# Generate UTF-8 output of a Unicode string
+
+use strict;
+
+use XML::Writer;
+
+my $unicodeString = "\x{201C}This\x{201D} is a test - \$ \x{00A3} \x{20AC}";
+
+my $w = new XML::Writer(ENCODING => 'utf-8');
+
+$w->xmlDecl();
+
+$w->startTag('doc');
+$w->characters($unicodeString);
+$w->endTag('doc');
+$w->end();
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/XML-Writer-0.603/examples/xml-writer-string.pl new/XML-Writer-0.604/examples/xml-writer-string.pl
--- old/XML-Writer-0.603/examples/xml-writer-string.pl 1970-01-01 01:00:00.000000000 +0100
+++ new/XML-Writer-0.604/examples/xml-writer-string.pl 2008-02-21 01:42:06.000000000 +0100
@@ -0,0 +1,19 @@
+#!/usr/bin/perl -w
+
+# Write to a string, then print the output
+
+use strict;
+
+use XML::Writer;
+
+my $s;
+
+my $w = new XML::Writer(OUTPUT => \$s);
+
+$w->startTag('doc');
+$w->characters('text');
+$w->endTag('doc');
+$w->end();
+
+# Print the string contents
+print $s
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/XML-Writer-0.603/Makefile.PL new/XML-Writer-0.604/Makefile.PL
--- old/XML-Writer-0.603/Makefile.PL 2007-06-25 23:35:24.000000000 +0200
+++ new/XML-Writer-0.604/Makefile.PL 2008-02-21 01:51:34.000000000 +0100
@@ -7,7 +7,7 @@
# the contents of the Makefile that is written.
WriteMakefile(
'NAME' => 'XML::Writer',
- 'VERSION' => '0.603',
+ 'VERSION' => '0.604',
# A manually-created META.yml has all the other metadata;
# we don't want it overwritten
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/XML-Writer-0.603/MANIFEST new/XML-Writer-0.604/MANIFEST
--- old/XML-Writer-0.603/MANIFEST 2006-09-23 23:26:58.000000000 +0200
+++ new/XML-Writer-0.604/MANIFEST 2008-02-21 01:42:06.000000000 +0100
@@ -8,3 +8,10 @@
t/pod.t
t/pod-coverage.t
TODO
+examples/simple-xml.pl
+examples/double-escaping-example.pl
+examples/namespace-prefixes.pl
+examples/xml-writer-string.pl
+examples/data-mode-sample.pl
+examples/writing-unicode.pl
+examples/directory-as-atom.pl
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/XML-Writer-0.603/META.yml new/XML-Writer-0.604/META.yml
--- old/XML-Writer-0.603/META.yml 2007-06-25 23:35:24.000000000 +0200
+++ new/XML-Writer-0.604/META.yml 2008-02-21 01:51:34.000000000 +0100
@@ -3,7 +3,7 @@
version: 1.2
url: http://module-build.sourceforge.net/META-spec-v1.2.html
name: XML-Writer
-version: 0.603
+version: 0.604
abstract: Easily generate well-formed, namespace-aware XML.
author:
- David Megginson
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/XML-Writer-0.603/Writer.pm new/XML-Writer-0.604/Writer.pm
--- old/XML-Writer-0.603/Writer.pm 2007-06-25 23:35:24.000000000 +0200
+++ new/XML-Writer-0.604/Writer.pm 2008-02-21 01:51:34.000000000 +0100
@@ -4,7 +4,7 @@
# Copyright (c) 2004, 2005 by Joseph Walton .
# No warranty. Commercial and non-commercial use freely permitted.
#
-# $Id: Writer.pm 178 2007-06-25 21:35:24Z josephw $
+# $Id: Writer.pm 185 2008-02-21 00:51:34Z josephw $
########################################################################
package XML::Writer;
@@ -15,7 +15,7 @@
use vars qw($VERSION);
use Carp;
use IO::Handle;
-$VERSION = "0.603";
+$VERSION = "0.604";
@@ -58,7 +58,7 @@
$nl = "\n";
}
- my $outputEncoding = $params{ENCODING};
+ my $outputEncoding = $params{ENCODING} || "";
my ($checkUnencodedRepertoire, $escapeEncoding);
if (lc($outputEncoding) eq 'us-ascii') {
$checkUnencodedRepertoire = \&_croakUnlessASCII;
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org