Hello community,
here is the log from the commit of package perl-XML-Writer for openSUSE:Factory checked in at 2012-02-14 13:09:59
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-XML-Writer (Old)
and /work/SRC/openSUSE:Factory/.perl-XML-Writer.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-XML-Writer", Maintainer is "VCizek@suse.com"
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-XML-Writer/perl-XML-Writer.changes 2011-12-20 14:30:44.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.perl-XML-Writer.new/perl-XML-Writer.changes 2012-02-14 13:10:01.000000000 +0100
@@ -1,0 +2,15 @@
+Thu Jan 19 02:34:02 UTC 2012 - vcizek@suse.com
+
+- update to 0.615
+ - Fix test skipping when Unicode is unsupported.
+
+-------------------------------------------------------------------
+Mon Jan 9 02:36:08 UTC 2012 - vcizek@suse.com
+
+- update to 0.614
+ * Fix regression in 0.613 and set encoding on GLOBs.
+ * Use 'Object->new()' syntax throughout (#65840).
+ * Support passing in any arbitrary object that has a print()
+ method (from Jason Rodrigues).
+
+-------------------------------------------------------------------
Old:
----
XML-Writer-0.612.tar.gz
New:
----
XML-Writer-0.615.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-XML-Writer.spec ++++++
--- /var/tmp/diff_new_pack.DveQZN/_old 2012-02-14 13:10:02.000000000 +0100
+++ /var/tmp/diff_new_pack.DveQZN/_new 2012-02-14 13:10:02.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package perl-XML-Writer
#
-# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -15,23 +15,24 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
-
%bcond_with pod
Name: perl-XML-Writer
+Version: 0.615
+Release: 0
%define cpan_name XML-Writer
Summary: Perl extension for writing XML documents
License: MIT
Group: Development/Libraries/Perl
-Version: 0.612
-Release: 0
Url: http://search.cpan.org/dist/XML-Writer/
-Source: http://www.cpan.org/modules/by-module/XML/XML-Writer-%{version}.tar.gz
-BuildArch: noarch
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
-%{perl_requires}
+#Source: http://www.cpan.org/modules/by-module/XML/XML-Writer-%{version}.tar.gz
+Source: http://search.cpan.org/CPAN/authors/id/J/JO/JOSEPHW/%{cpan_name}-%{version}.tar.gz
+
BuildRequires: perl
BuildRequires: perl-macros
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
+BuildArch: noarch
+%{perl_requires}
%if %{with pod}
BuildRequires: perl(Test::Pod) >= 1.00
BuildRequires: perl(Test::Pod::Coverage)
@@ -43,31 +44,27 @@
character data and constructs different types of markup, such as tags,
comments, and processing instructions.
-Authors:
---------
- David Megginson
-
%prep
%setup -q -n %{cpan_name}-%{version}
%build
-%{__perl} Makefile.PL INSTALLDIRS=vendor
-%{__make} %{?_smp_mflags}
+perl Makefile.PL INSTALLDIRS=vendor
+make %{?_smp_mflags}
%check
-%{__make} test
+make test
%install
%perl_make_install
# do not perl_process_packlist (noarch)
# remove .packlist file
-%{__rm} -rf $RPM_BUILD_ROOT%perl_vendorarch
+rm -rf %{buildroot}%perl_vendorarch
# remove perllocal.pod file
-%{__rm} -rf $RPM_BUILD_ROOT%perl_archlib
+rm -rf %{buildroot}%perl_archlib
%perl_gen_filelist
%clean
-%{__rm} -rf $RPM_BUILD_ROOT
+rm -rf %{buildroot}
%files -f %{name}.files
%defattr(-,root,root,-)
++++++ XML-Writer-0.612.tar.gz -> XML-Writer-0.615.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-Writer-0.612/Changes new/XML-Writer-0.615/Changes
--- old/XML-Writer-0.612/Changes 2010-08-15 16:11:12.000000000 +0200
+++ new/XML-Writer-0.615/Changes 2012-01-16 15:34:31.000000000 +0100
@@ -1,13 +1,24 @@
Revision history for Perl extension XML::Writer.
+0.615 Tue Jan 17 01:32:07 2012 +1100
+ - Fix test skipping when Unicode is unsupported.
+
+0.614 Mon Jan 9 00:24:10 2012 +1100
+ - Fix regression in 0.613 and set encoding on GLOBs.
+
+0.613 Sat Jan 7 22:51:26 2012 +1100
+ - Use 'Object->new()' syntax throughout (#65840).
+ - Support passing in any arbitrary object that has a print()
+ method (from Jason Rodrigues).
+
0.612 Mon Aug 16 00:10:16 2010 +1000
- Allow DATA_INDENT to specify arbitrary white space for
indentation. If it is numeric then use that many space
characters.
-
+
0.611 Thu Apr 22 13:09:12 BST 2010
- Adopt rewritten license text to explicitly allow modification.
-
+
0.610 Mon Mar 29 02:29:32 BST 2010
- Add a CHECK_PRINT constructor parameter to check the output print
success (#50465). It will croak when printing to output fails.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-Writer-0.612/META.yml new/XML-Writer-0.615/META.yml
--- old/XML-Writer-0.612/META.yml 2010-08-15 16:11:12.000000000 +0200
+++ new/XML-Writer-0.615/META.yml 2012-01-16 15:34:31.000000000 +0100
@@ -3,7 +3,7 @@
version: 1.4
url: http://module-build.sourceforge.net/META-spec-v1.4.html
name: XML-Writer
-version: 0.612
+version: 0.615
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.612/Makefile.PL new/XML-Writer-0.615/Makefile.PL
--- old/XML-Writer-0.612/Makefile.PL 2010-08-15 16:11:12.000000000 +0200
+++ new/XML-Writer-0.615/Makefile.PL 2012-01-16 15:34:31.000000000 +0100
@@ -7,7 +7,7 @@
# the contents of the Makefile that is written.
WriteMakefile(
'NAME' => 'XML::Writer',
- 'VERSION' => '0.612',
+ 'VERSION' => '0.615',
# 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.612/README new/XML-Writer-0.615/README
--- old/XML-Writer-0.612/README 2010-08-15 16:11:12.000000000 +0200
+++ new/XML-Writer-0.615/README 2012-01-16 15:34:31.000000000 +0100
@@ -22,4 +22,4 @@
Copyright (c) 2003 Ed Avis
Copyright (c) 2004-2010 Joseph Walton
-Current development is hosted at http://xml-writer-perl.berlios.de/.
+Current development is hosted at http://josephw.github.com/xml-writer-perl/.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-Writer-0.612/Writer.pm new/XML-Writer-0.615/Writer.pm
--- old/XML-Writer-0.612/Writer.pm 2010-08-15 16:11:12.000000000 +0200
+++ new/XML-Writer-0.615/Writer.pm 2012-01-16 15:34:31.000000000 +0100
@@ -15,7 +15,7 @@
use vars qw($VERSION);
use Carp;
use IO::Handle;
-$VERSION = "0.612";
+$VERSION = "0.615";
@@ -40,7 +40,7 @@
# from within XML::Writer::Namespaces::new()
if ($params{NAMESPACES}) {
delete $params{NAMESPACES};
- return new XML::Writer::Namespaces(%params);
+ return XML::Writer::Namespaces->new(%params);
}
# Set up $self and basic parameters
@@ -168,7 +168,7 @@
$seen{ANYTHING} = 1;
if (($name =~ /^xml/i) && ($name !~ /^xml-stylesheet$/i)) {
carp("Processing instruction target begins with 'xml'");
- }
+ }
if ($name =~ /\?\>/ || (defined($data) && $data =~ /\?\>/)) {
croak("Processing instruction may not contain '?>'");
@@ -465,12 +465,12 @@
my $newOutput = $_[0];
if (ref($newOutput) eq 'SCALAR') {
- $output = new XML::Writer::_String($newOutput);
+ $output = XML::Writer::_String->new($newOutput);
} else {
# If there is no OUTPUT parameter,
# use standard output
$output = $newOutput || \*STDOUT;
- if ($outputEncoding) {
+ if ($outputEncoding && (ref($output) eq 'GLOB' || $output->isa('IO::Handle'))) {
if (lc($outputEncoding) eq 'utf-8') {
binmode($output, ':encoding(utf-8)');
} elsif (lc($outputEncoding) eq 'us-ascii') {
@@ -831,7 +831,7 @@
delete $prefixMap{$defaultPrefix} if ($defaultPrefix);
# Create an instance of the parent.
- my $self = new XML::Writer(%params);
+ my $self = XML::Writer->new(%params);
# Snarf the parent's methods that we're
# going to override.
@@ -917,7 +917,7 @@
$nsCopyFlag = 1;
}
$uriMap->{''} = $uri;
-
+
# Is there a straight-forward prefix?
} elsif ($prefix) {
$$nameref = "$prefix:$local";
@@ -1198,10 +1198,10 @@
use XML::Writer;
use IO::File;
- my $output = new IO::File(">output.xml");
+ my $output = IO::File->new(">output.xml");
- my $writer = new XML::Writer(OUTPUT => $output);
- $writer->startTag("greeting",
+ my $writer = XML::Writer->new(OUTPUT => $output);
+ $writer->startTag("greeting",
"class" => "simple");
$writer->characters("Hello, world!");
$writer->endTag("greeting");
@@ -1241,7 +1241,7 @@
Create a new XML::Writer object:
- my $writer = new XML::Writer(OUTPUT => $output, NEWLINES => 1);
+ my $writer = XML::Writer->new(OUTPUT => $output, NEWLINES => 1);
Arguments are an anonymous hash array of parameters:
@@ -1249,11 +1249,11 @@
=item OUTPUT
-An object blessed into IO::Handle or one of its subclasses (such as
-IO::File), or a reference to a string; if this parameter is not present,
-the module will write to standard output. If a string reference is passed,
-it will capture the generated XML (as a string; to get bytes use the
-C<Encode> module).
+An object blessed into IO::Handle or one of its subclasses (such as IO::File),
+or a reference to a string, or any blessed object that has a print() method;
+if this parameter is not present, the module will write to standard output. If
+a string reference is passed, it will capture the generated XML (as a string;
+to get bytes use the C<Encode> module).
=item NAMESPACES
@@ -1263,7 +1263,7 @@
following example:
my $rdfns = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";
- my $writer = new XML::Writer(NAMESPACES => 1);
+ my $writer = XML::Writer->new(NAMESPACES => 1);
$writer->startTag([$rdfns, "Description"]);
The first member of the array is a namespace URI, and the second part
@@ -1280,7 +1280,7 @@
my $rdfns = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";
- my $writer = new XML::Writer(NAMESPACES => 1,
+ my $writer = XML::Writer->new(NAMESPACES => 1,
PREFIX_MAP => {$rdfns => 'rdf'});
The keys in the hash table are namespace URIs, and the values are the
@@ -1653,7 +1653,7 @@
create XML documents; however, if necessary, it can be turned off by
providing an UNSAFE parameter:
- my $writer = new XML::Writer(OUTPUT => $output, UNSAFE => 1);
+ my $writer = XML::Writer->new(OUTPUT => $output, UNSAFE => 1);
=head1 AUTHOR
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-Writer-0.612/examples/data-mode-sample.pl new/XML-Writer-0.615/examples/data-mode-sample.pl
--- old/XML-Writer-0.612/examples/data-mode-sample.pl 2010-08-15 16:11:12.000000000 +0200
+++ new/XML-Writer-0.615/examples/data-mode-sample.pl 2012-01-16 15:34:31.000000000 +0100
@@ -7,7 +7,7 @@
use XML::Writer;
use IO::File;
-my $writer = new XML::Writer(DATA_MODE => 1, DATA_INDENT => 2);
+my $writer = XML::Writer->new(DATA_MODE => 1, DATA_INDENT => 2);
$writer->startTag("doc");
$writer->startTag("x");
$writer->dataElement("y", "Hello, world!");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-Writer-0.612/examples/directory-as-atom.pl new/XML-Writer-0.615/examples/directory-as-atom.pl
--- old/XML-Writer-0.612/examples/directory-as-atom.pl 2010-08-15 16:11:12.000000000 +0200
+++ new/XML-Writer-0.615/examples/directory-as-atom.pl 2012-01-16 15:34:31.000000000 +0100
@@ -28,7 +28,7 @@
my $uid = (stat($dir))[4];
-my $dh = new DirHandle($dir) || die "Unable to opendir $dir: $!";
+my $dh = DirHandle->new($dir) || die "Unable to opendir $dir: $!";
my @de;
@@ -74,7 +74,7 @@
return $d->iso8601 . "Z";
}
-my $w = new XML::Writer(
+my $w = XML::Writer->new(
# Use namespaces
NAMESPACES => 1,
@@ -91,9 +91,9 @@
ENCODING => 'utf-8'
);
-$base = new URI::URL($base)->abs;
+$base = URI::URL->new($base)->abs;
-my $feedUrl = new URI::URL('index.atom', $base);
+my $feedUrl = URI::URL->new('index.atom', $base);
$w->xmlDecl();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-Writer-0.612/examples/double-escaping-example.pl new/XML-Writer-0.615/examples/double-escaping-example.pl
--- old/XML-Writer-0.612/examples/double-escaping-example.pl 2010-08-15 16:11:12.000000000 +0200
+++ new/XML-Writer-0.615/examples/double-escaping-example.pl 2012-01-16 15:34:31.000000000 +0100
@@ -9,7 +9,7 @@
use XML::Writer;
-my $w = new XML::Writer();
+my $w = XML::Writer->new();
$w->startTag('doc');
$w->characters('In HTML and XML, an ampersand must be escaped as &');
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-Writer-0.612/examples/namespace-prefixes.pl new/XML-Writer-0.615/examples/namespace-prefixes.pl
--- old/XML-Writer-0.612/examples/namespace-prefixes.pl 2010-08-15 16:11:12.000000000 +0200
+++ new/XML-Writer-0.615/examples/namespace-prefixes.pl 2012-01-16 15:34:31.000000000 +0100
@@ -12,7 +12,7 @@
my $EXT2 = 'http://www.example.com/feed-extension-2';
my $EXT3 = 'http://www.example.com/feed-extension-3';
-my $w = new XML::Writer(
+my $w = XML::Writer->new(
NAMESPACES => 1,
DATA_MODE => 1,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-Writer-0.612/examples/simple-xml.pl new/XML-Writer-0.615/examples/simple-xml.pl
--- old/XML-Writer-0.612/examples/simple-xml.pl 2010-08-15 16:11:12.000000000 +0200
+++ new/XML-Writer-0.615/examples/simple-xml.pl 2012-01-16 15:34:31.000000000 +0100
@@ -10,7 +10,7 @@
open($output, '>', 'output.xml') or die "Unable to open output file: $!";
-my $writer = new XML::Writer(OUTPUT => $output);
+my $writer = XML::Writer->new(OUTPUT => $output);
$writer->startTag("greeting",
"class" => "simple");
$writer->characters("Hello, world!");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-Writer-0.612/examples/writing-unicode.pl new/XML-Writer-0.615/examples/writing-unicode.pl
--- old/XML-Writer-0.612/examples/writing-unicode.pl 2010-08-15 16:11:12.000000000 +0200
+++ new/XML-Writer-0.615/examples/writing-unicode.pl 2012-01-16 15:34:31.000000000 +0100
@@ -8,7 +8,7 @@
my $unicodeString = "\x{201C}This\x{201D} is a test - \$ \x{00A3} \x{20AC}";
-my $w = new XML::Writer(ENCODING => 'utf-8');
+my $w = XML::Writer->new(ENCODING => 'utf-8');
$w->xmlDecl();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-Writer-0.612/examples/xml-writer-string.pl new/XML-Writer-0.615/examples/xml-writer-string.pl
--- old/XML-Writer-0.612/examples/xml-writer-string.pl 2010-08-15 16:11:12.000000000 +0200
+++ new/XML-Writer-0.615/examples/xml-writer-string.pl 2012-01-16 15:34:31.000000000 +0100
@@ -8,7 +8,7 @@
my $s;
-my $w = new XML::Writer(OUTPUT => \$s);
+my $w = XML::Writer->new(OUTPUT => \$s);
$w->startTag('doc');
$w->characters('text');
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-Writer-0.612/t/01_main.t new/XML-Writer-0.615/t/01_main.t
--- old/XML-Writer-0.612/t/01_main.t 2010-08-15 16:11:12.000000000 +0200
+++ new/XML-Writer-0.615/t/01_main.t 2012-01-16 15:34:31.000000000 +0100
@@ -15,7 +15,7 @@
use Errno;
-use Test::More(tests => 236);
+use Test::More(tests => 239);
# Catch warnings
@@ -45,7 +45,7 @@
require XML::Writer;
SKIP: {
- skip "Perls before 5.6 always warn when loading XML::Writer", 1 if $] <=
+ skip "Perls before 5.6 always warn when loading XML::Writer", 1 if $] <=
5.006;
wasNoWarning('Loading XML::Writer should not result in warnings');
@@ -84,7 +84,7 @@
$args{'NAMESPACES'} = 1 unless(defined($args{'NAMESPACES'}));
undef($warning);
- $w = new XML::Writer(%args) || die "Cannot create XML writer";
+ $w = XML::Writer->new(%args) || die "Cannot create XML writer";
}
#
@@ -779,7 +779,7 @@
wasNoWarning('The test processing instructions should not cause warnings');
};
-# Verify that a still-reserved processing instruction generates
+# Verify that a still-reserved processing instruction generates
# a warning.
TEST: {
initEnv();
@@ -1407,7 +1407,7 @@
initEnv();
my $s;
- $w = new XML::Writer(OUTPUT => \$s);
+ $w = XML::Writer->new(OUTPUT => \$s);
$w->emptyTag('x');
$w->end();
@@ -1420,7 +1420,7 @@
initEnv();
my $s;
- $w = new XML::Writer(OUTPUT => \$s);
+ $w = XML::Writer->new(OUTPUT => \$s);
$w->startTag('foo', bar => 'baz');
is($s, "", 'Scalars should be up-to-date during writing');
@@ -1437,7 +1437,7 @@
initEnv();
my $s;
- ok(eval {$w = new XML::Writer(OUTPUT => \$s,
+ ok(eval {$w = XML::Writer->new(OUTPUT => \$s,
ENCODING => 'utf-8'
);}, 'OUTPUT and ENCODING should not cause failure');
}
@@ -1456,7 +1456,7 @@
initEnv();
my $s;
- $w = new XML::Writer(OUTPUT => \$s);
+ $w = XML::Writer->new(OUTPUT => \$s);
my $x = 'x';
utf8::upgrade($x);
@@ -1468,7 +1468,7 @@
undef($s);
- $w = new XML::Writer(OUTPUT => \$s);
+ $w = XML::Writer->new(OUTPUT => \$s);
$w->startTag('a');
$w->dataElement('x', "\$");
$w->dataElement('x', "\x{A3}");
@@ -1943,7 +1943,7 @@
TEST: {
initEnv(
DATA_MODE => 1,
- DATA_INDENT => ''
+ DATA_INDENT => ''
);
$w->xmlDecl();
@@ -1974,12 +1974,41 @@
is($w->getDataIndent(), 0, 'Non-numeric indent should fall back to zero');
};
+TEST: {
+ my $output;
+ bless \$output, 'DuckOutput';
+ ok(eval {
+ initEnv(
+ OUTPUT=>\$output,
+ ENCODING=>'UTF-8'
+ );
+ }, "An encoding for a blessed ref shouldn't cause errors.");
+
+ $w->xmlDecl();
+ is($output, qq{<?xml version="1.0" encoding="UTF-8"?>\n}, "Basic Duck Typing output");
+};
+
+# We should try to set the encoding on GLOBs as well as IO::Handles
+SKIP: {
+ skip $unicodeSkipMessage, 1 unless isUnicodeSupported();
+
+ expectError('encoding', eval {
+ initEnv(OUTPUT => \*STDOUT,
+ ENCODING => 'x-unsupported-encoding');
+ });
+};
+
# Free test resources
$outputFile->close() or die "Unable to close temporary file: $!";
1;
+package DuckOutput;
+
+sub print { ${(shift)} .= join('', @_); }
+
+
package XML::Writer::Test::FailingWriter;
sub new
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org