commit perl-XML-Writer for openSUSE:Factory
Hello community, here is the log from the commit of package perl-XML-Writer for openSUSE:Factory checked in at 2013-07-30 19:11:26 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-XML-Writer (Old) and /work/SRC/openSUSE:Factory/.perl-XML-Writer.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "perl-XML-Writer" Changes: -------- --- /work/SRC/openSUSE:Factory/perl-XML-Writer/perl-XML-Writer.changes 2013-06-06 14:48:21.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.perl-XML-Writer.new/perl-XML-Writer.changes 2013-07-30 19:11:27.000000000 +0200 @@ -1,0 +2,7 @@ +Sat Jul 27 11:58:49 UTC 2013 - coolo@suse.com + +- updated to 0.623 + - Fix a memory leak introduced in 0.620. + - Avoid issue with implicit stringification. + +------------------------------------------------------------------- Old: ---- XML-Writer-0.622.tar.gz New: ---- XML-Writer-0.623.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-XML-Writer.spec ++++++ --- /var/tmp/diff_new_pack.jPIzaH/_old 2013-07-30 19:11:28.000000000 +0200 +++ /var/tmp/diff_new_pack.jPIzaH/_new 2013-07-30 19:11:28.000000000 +0200 @@ -17,7 +17,7 @@ Name: perl-XML-Writer -Version: 0.622 +Version: 0.623 Release: 0 %define cpan_name XML-Writer Summary: Perl extension for writing XML documents. ++++++ XML-Writer-0.622.tar.gz -> XML-Writer-0.623.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-Writer-0.622/Changes new/XML-Writer-0.623/Changes --- old/XML-Writer-0.622/Changes 2013-05-28 16:58:53.000000000 +0200 +++ new/XML-Writer-0.623/Changes 2013-06-13 15:32:44.000000000 +0200 @@ -1,5 +1,9 @@ Revision history for Perl extension XML::Writer. +0.623 Thu Jun 13 23:29:52 2013 +1000 <joe@kafsemo.org> + - Fix a memory leak introduced in 0.620. + - Avoid issue with implicit stringification. + 0.622 Tue May 28 23:02:56 2013 +1000 <joe@kafsemo.org> - Fix bug where output is an IO::Scalar. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-Writer-0.622/META.yml new/XML-Writer-0.623/META.yml --- old/XML-Writer-0.622/META.yml 2013-05-28 16:58:53.000000000 +0200 +++ new/XML-Writer-0.623/META.yml 2013-06-13 15:32:44.000000000 +0200 @@ -3,7 +3,7 @@ version: 1.4 url: http://module-build.sourceforge.net/META-spec-v1.4.html name: XML-Writer -version: 0.622 +version: 0.623 abstract: Easily generate well-formed, namespace-aware XML. author: - David Megginson <david@megginson.com> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-Writer-0.622/Makefile.PL new/XML-Writer-0.623/Makefile.PL --- old/XML-Writer-0.622/Makefile.PL 2013-05-28 16:58:53.000000000 +0200 +++ new/XML-Writer-0.623/Makefile.PL 2013-06-13 15:32:44.000000000 +0200 @@ -7,7 +7,7 @@ # the contents of the Makefile that is written. WriteMakefile( 'NAME' => 'XML::Writer', - 'VERSION' => '0.622', + 'VERSION' => '0.623', # 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.622/Writer.pm new/XML-Writer-0.623/Writer.pm --- old/XML-Writer-0.622/Writer.pm 2013-05-28 16:58:53.000000000 +0200 +++ new/XML-Writer-0.623/Writer.pm 2013-06-13 15:32:44.000000000 +0200 @@ -15,7 +15,7 @@ use vars qw($VERSION); use Carp; use IO::Handle; -$VERSION = "0.622"; +$VERSION = "0.623"; use overload '""' => \&_overload_string; @@ -106,7 +106,7 @@ my $end = sub { $output->print("\n"); - return $selfcontained_output + return $selfcontained_output if $use_selfcontained_output and defined wantarray; }; @@ -478,7 +478,6 @@ if (ref($newOutput) eq 'SCALAR') { $output = XML::Writer::_String->new($newOutput); } else { - # If there is no OUTPUT parameter, # use standard output $output = $newOutput || \*STDOUT; @@ -493,24 +492,24 @@ } } - $self->{OVERLOADSTRING} = sub { - # if we don't use the self-contained output, - # simple passthrough - return $use_selfcontained_output ? $self->to_string : $self ; - }; - - $self->{TOSTRING} = sub { - die "'to_string' can only be used with self-contained output\n" - unless $use_selfcontained_output; - - return $selfcontained_output; - }; - if ($params{CHECK_PRINT}) { $output = XML::Writer::_PrintChecker->new($output); } }; + $self->{OVERLOADSTRING} = sub { + # if we don't use the self-contained output, + # simple passthrough + return $use_selfcontained_output ? $selfcontained_output : undef; + }; + + $self->{TOSTRING} = sub { + die "'to_string' can only be used with self-contained output\n" + unless $use_selfcontained_output; + + return $selfcontained_output; + }; + $self->{'SETDATAMODE'} = sub { $dataMode = $_[0]; }; @@ -823,8 +822,9 @@ } sub _overload_string { - $_[0]->{OVERLOADSTRING}->(); -} + my $self = shift; + $self->{OVERLOADSTRING}->() || overload::StrVal($self); +} ######################################################################## # XML::Writer::Namespaces - subclass for Namespace processing. @@ -1290,7 +1290,7 @@ to get bytes use the C<Encode> module). If the string I<self> is passed, the output will be captured internally by the -object, and can be accessed via the C<to_string()> method, or by calling the +object, and can be accessed via the C<to_string()> method, or by calling the object in a string context. my $writer = XML::Writer->new( OUTPUT => 'self' ); @@ -1706,16 +1706,16 @@ my $writer = XML::Writer->new(OUTPUT => $output, UNSAFE => 1); -=head2 PRINTING OUTPUT +=head2 PRINTING OUTPUT -If I<OUTPUT> has been set to I<self> and the object has been called in +If I<OUTPUT> has been set to I<self> and the object has been called in a string context, it'll return the xml document. =over 4 =item to_string -If I<OUTPUT> has been set to I<self>, calls an implicit C<end()> on the +If I<OUTPUT> has been set to I<self>, calls an implicit C<end()> on the document and prints it. Dies if I<OUTPUT> has been set to anything else. =back diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-Writer-0.622/t/01_main.t new/XML-Writer-0.623/t/01_main.t --- old/XML-Writer-0.622/t/01_main.t 2013-05-28 16:58:53.000000000 +0200 +++ new/XML-Writer-0.623/t/01_main.t 2013-06-13 15:32:44.000000000 +0200 @@ -84,7 +84,7 @@ $args{'NAMESPACES'} = 1 unless(defined($args{'NAMESPACES'})); undef($warning); - $w = XML::Writer->new(%args) || die "Cannot create XML writer"; + defined($w = XML::Writer->new(%args)) || die "Cannot create XML writer"; } # diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-Writer-0.622/t/selfcontained_output.t new/XML-Writer-0.623/t/selfcontained_output.t --- old/XML-Writer-0.622/t/selfcontained_output.t 2013-05-28 16:58:53.000000000 +0200 +++ new/XML-Writer-0.623/t/selfcontained_output.t 2013-06-13 15:32:44.000000000 +0200 @@ -1,7 +1,7 @@ use strict; use warnings; -use Test::More tests => 9; +use Test::More tests => 10; use XML::Writer; @@ -30,6 +30,8 @@ like "$normal" => qr/^XML::Writer=HASH/, 'auto-stringification on normal'; +is ref($normal->_overload_string) => '', + 'auto-stringification returns a string directly'; $contained = XML::Writer->new( OUTPUT => 'self' ); $contained->emptyTag('empty');
participants (1)
-
root@hilbert.suse.de