debian/0000755000000000000000000000000011434325233007166 5ustar debian/control0000644000000000000000000000224711432507662010604 0ustar Source: libxml-sax-writer-perl Section: perl Priority: optional Maintainer: Debian Perl Group Uploaders: gregor herrmann , Antonio Radici , Nicholas Bamber Standards-Version: 3.9.1 Homepage: http://search.cpan.org/dist/XML-SAX-Writer/ Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libxml-sax-writer-perl/ Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/libxml-sax-writer-perl/ Build-Depends: debhelper (>= 7) Build-Depends-Indep: perl, libxml-filter-buffertext-perl, libxml-namespacesupport-perl, libxml-sax-perl Package: libxml-sax-writer-perl Architecture: all Depends: ${misc:Depends}, ${perl:Depends}, libxml-filter-buffertext-perl, libxml-namespacesupport-perl, libxml-sax-perl Description: Perl module for a SAX2 XML writer XML::SAX::Writer helps to serialize SAX2 representations of XML documents to strings, files, and other flat representations. It handles charset encodings, XML escaping conventions, and so forth. It is still considered alpha, although it has been put to limited use in settings such as XML::LibXML and the AxKit XML Application Server. debian/copyright0000644000000000000000000000322511434267603011131 0ustar Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=135 Maintainer: Robin Berjon Source: http://search.cpan.org/dist/XML-SAX-Writer/ Name: XML-SAX-Writer Files: * Copyright: 2001-2006, Robin Berjon and Perl XML project License: Artistic or GPL-1+ Files: inc/* Copyright: 2002-2009, by Brian Ingerson, Audrey Tang and Adam Kennedy License: Artistic or GPL-1+ Files: debian/* Copyright: 2002-2003, Ardo van Rangelrooij 2004, Jay Bonci 2004, Michael K. Edwards 2005-2007, Florian Ragwitz 2005, Frank Lichtenheld 2008, Marc 'HE' Brockschmidt 2008, gregor herrmann 2009, Antonio Radici 2010, Nicholas Bamber License: Artistic or GPL-1+ File: debian/patches/half_code_pod_errors.patch Copyright: 2010, Frank Wiegand License: Artistic or GPL-1+ License: Artistic 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'. License: GPL-1+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. . On Debian GNU/Linux systems, the complete text of version 1 of the General Public License can be found in `/usr/share/common-licenses/GPL-1'. debian/watch0000644000000000000000000000016711212456144010223 0ustar version=3 http://search.cpan.org/dist/XML-SAX-Writer/ .*/XML-SAX-Writer-v?(\d[\d.]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip) debian/patches/0000755000000000000000000000000011434325134010615 5ustar debian/patches/quote_xml_version.patch0000644000000000000000000000160411434325104015416 0ustar Subject: use double quotes in xml declarations Author: Florian Ragwitz Reviewed-by: Nicholas Bamber Forwarded: no Last-Update: 2010-08-22 --- a/lib/XML/SAX/Writer/XML.pm +++ b/lib/XML/SAX/Writer/XML.pm @@ -481,14 +481,14 @@ # also, there's order in the pseudo-attr my $xd = ''; if ($data->{Version}) { - $xd .= "{Version}'"; + $xd .= "{Version}\""; if ($data->{Encoding}) { - $xd .= " encoding='$data->{Encoding}'"; + $xd .= " encoding=\"$data->{Encoding}\""; } if ($data->{Standalone}) { - $xd .= " standalone='$data->{Standalone}'"; + $xd .= " standalone=\"$data->{Standalone}\""; } - $xd .= '?>'; + $xd .= "?>\n"; } #$xd = $self->{Encoder}->convert($xd); # this may blow up debian/patches/series0000644000000000000000000000015111434267603012035 0ustar quote_xml_version.patch combined_pod_fixes.patch file_consumer_encoding.patch half_code_pod_errors.patch debian/patches/half_code_pod_errors.patch0000644000000000000000000000173111434267603016010 0ustar Author: Frank Wiegand Origin: http://rt.cpan.org/Ticket/Attachment/692202/356379/diff Bug: http://rt.cpan.org/Ticket/Display.html?id=51618 Subject: POD nits [ C<...> construct missing left side ] Last-Update: 2010-08-22 --- a/lib/XML/SAX/Writer.pm +++ b/lib/XML/SAX/Writer.pm @@ -635,17 +635,17 @@ This is used to set the proper converter for character encodings. The default implementation should suffice but you can override it. It must -set C<$self->{Encoder}> to an Encoder object. Subclasses *should* call +set C<< $self->{Encoder} >> to an Encoder object. Subclasses *should* call it. =item setConsumer Same as above, except that it is for the Consumer object, and that it -must set C<$self->{Consumer}>. +must set C<< $self->{Consumer} >>. =item setEscaperRegex -Will initialise the escaping regex C<$self->{EscaperRegex}> based on +Will initialise the escaping regex C<< $self->{EscaperRegex} >> based on what is needed. =item escape STRING debian/patches/file_consumer_encoding.patch0000644000000000000000000000222211434325104016331 0ustar Subject: Defensive to encoding of output in FileConsumer * Add '>:encoding(EncodeTo)' line discipline to FileConsumer to defeat perl's automatic charset conversion. Author: Florian Ragwitz Reviewed-by: Nicholas Bamber Forwarded: no Last-Update: 2010-08-22 --- a/lib/XML/SAX/Writer.pm +++ b/lib/XML/SAX/Writer.pm @@ -330,7 +330,10 @@ # new #-------------------------------------------------------------------# sub new { - my ( $proto, $file ) = ( shift, shift ); + my ( $proto, $file, $opt ) = @_; + my $enc_to = (defined $opt and ref $opt eq 'HASH' + and defined $opt->{EncodeTo}) ? $opt->{EncodeTo} + : 'utf-8'; XML::SAX::Writer::Exception->throw( Message => "No filename provided to " . ref( $proto || $proto ) @@ -338,9 +341,10 @@ local *XFH; - open XFH, ">$file" or XML::SAX::Writer::Exception->throw( + open XFH, ">:encoding($enc_to)", $file + or XML::SAX::Writer::Exception->throw( Message => "Error opening file $file: $!" - ); + ); return $proto->SUPER::new( *{XFH}{IO}, @_ ); } debian/patches/combined_pod_fixes.patch0000644000000000000000000001011311434251566015461 0ustar Subject: Fix documentation issues * add more documentation on encoding errors * Implementation moved from Text::Iconv to Encode without updating documentation. Also the change broke Florian's suggestion. * Stripped a number of stray characters of dubious encoding. These appear to be blank in the code, appear as 'A' in the man page, and 'A^' in the CPAN web page. * Added '*' in lest to make man page look correct Author: Florian Ragwitz Last-Update: 2010-08-22 Bug: http://rt.cpan.org/Ticket/Display.html?id=60504 Reviewed-By: Nicholas Bamber --- a/lib/XML/SAX/Writer.pm +++ b/lib/XML/SAX/Writer.pm @@ -437,16 +437,16 @@ =item * new(%hash) -This is the constructor for this object.  It takes a number of +This is the constructor for this object. It takes a number of parameters, all of which are optional. -=item -- Output +=item * -- Output -This parameter can be one of several things.  If it is a simple +This parameter can be one of several things. If it is a simple scalar, it is interpreted as a filename which will be opened for -writing.  If it is a scalar reference, output will be appended to this -scalar.  If it is an array reference, output will be pushed onto this -array as it is generated.  If it is a filehandle, then output will be +writing. If it is a scalar reference, output will be appended to this +scalar. If it is an array reference, output will be pushed onto this +array as it is generated. If it is a filehandle, then output will be sent to this filehandle. Finally, it is possible to pass an object for this parameter, in which @@ -456,11 +456,11 @@ If this parameter is not provided, then output is sent to STDOUT. -=item -- Escape +=item * -- Escape This should be a hash reference where the keys are characters sequences that should be escaped and the values are the escaped form -of the sequence.  By default, this module will escape the ampersand +of the sequence. By default, this module will escape the ampersand (&), less than (<), greater than (>), double quote ("), and apostrophe ('). Note that some browsers don't support the ' escape used for apostrophes so that you should be careful when outputting XHTML. @@ -468,24 +468,24 @@ If you only want to add entries to the Escape hash, you can first copy the contents of %XML::SAX::Writer::DEFAULT_ESCAPE. -=item -- CommentEscape +=item * -- CommentEscape Comment content often needs to be escaped differently from other content. This option works exactly as the previous one except that by default it only escapes the double dash (--) and that the contents can be copied from %XML::SAX::Writer::COMMENT_ESCAPE. -=item -- EncodeFrom +=item * -- EncodeFrom The character set encoding in which incoming data will be provided. This defaults to UTF-8, which works for US-ASCII as well. -=item -- EncodeTo +=item * -- EncodeTo -The character set encoding in which output should be encoded.  Again, +The character set encoding in which output should be encoded. Again, this defaults to UTF-8. -=item -- QuoteCharacter +=item * -- QuoteCharacter Set the character used to quote attributes. This defaults to single quotes (') for backwards compatiblity. @@ -588,10 +588,9 @@ =head1 THE ENCODER INTERFACE Encoders can be plugged in to allow one to use one's favourite encoder -object. Presently there are two encoders: Iconv and NullEncoder, and -one based on C ought to be out soon. They need to implement -two methods, and may inherit from XML::SAX::Writer::NullConverter if -they wish to +object. Presently there are two encoders: Encode and NullEncoder. They +need to implement two methods, and may inherit from +XML::SAX::Writer::NullConverter if they wish to =over 4 @@ -605,6 +604,11 @@ =back +Note that the return value of the convert method is B checked. Output may +be truncated if a character couldn't be converted correctly. To avoid problems +the encoder should take care encoding errors itself, for example by raising an +exception. + =head1 CUSTOM OUTPUT This module is generally used to write XML -- which it does most of the debian/compat0000644000000000000000000000000211151532551010363 0ustar 7 debian/changelog0000644000000000000000000001671211434312010011034 0ustar libxml-sax-writer-perl (0.53-1) unstable; urgency=low [ gregor herrmann ] * Remove Florian Ragwitz from Uploaders (closes: #523278). [ Nathan Handler ] * debian/watch: Update to ignore development releases. [ gregor herrmann ] * debian/control: Changed: (build-)depend on perl instead of perl- modules. * debian/control: remove version from perl (build) dependency. [ Nicholas Bamber ] * New upstream version * Updated control: standards, Uploaders and dependencies * Added source/format, removed README.source, simplified dependencies and modernized rules as quilt is now standard. * Updated copyright * Removed fix_05basic patch as it is no longer required. * Removed consumer_newline.patch as it is no longer required. * Reviewed remaining patches refreshing, editing, folding and adding headers as required. * Applied a pod patch from Frank Wiegand. -- Nicholas Bamber Sun, 22 Aug 2010 20:38:52 +0100 libxml-sax-writer-perl (0.52-1) unstable; urgency=low [ Antonio Radici ] * New upstream release * debian/control: + added me to the Uploaders + removed duplicate priority and section field from the binary package + debhelper dependency bumped to 7 * debian/patches, the following patches were refreshed: + debian/patches/fix_pod.patch + debian/patches/consumer_newline.patch + debian/patches/convert_errors.patch + debian/patches/fix_05basic_t.patch + debian/patches/file_consumer_encoding.patch * debian/patches/fix_05basic_t.patch: + added the missing description * debian/patches/fix_pod.patch (modified): + fixed some other pod warnings * debian/copyright: + moved to the new format + added inc/* and debian/* copyrights * debian/rules: + refreshed by dh-make-perl * debian/compat: bumped to 7 by dh-make-perl [ gregor herrmann ] * debian/control: - switch Vcs-Browser field to ViewSVN - add ${misc:Depends} to Depends: field - mention module name in long description - wrap long lines -- Antonio Radici Wed, 25 Feb 2009 00:53:37 +0000 libxml-sax-writer-perl (0.50-2) unstable; urgency=low * Take over for the Debian Perl Group with maintainer's permission (http://lists.debian.org/debian-perl/2008/06/msg00039.html) * debian/control: Added: Vcs-Svn field (source stanza); Vcs-Browser field (source stanza); Homepage field (source stanza). Changed: Maintainer set to Debian Perl Group (was: Florian Ragwitz ); Florian Ragwitz moved to Uploaders. * debian/watch: use dist-based URL. * debian/rules: delete /usr/lib/perl5 only if it exists (closes: #479922). * Switch patch system from dpatch to quilt. * Add /me to Uploaders. * Set Standards-Version to 3.8.0, document quilt usage in debian/README.source. * Set debhelper compatibility level to 5. * debian/copyright: point to a specific download location instead of CPAN at large; add copyright/license for third-party code. * Refresh debian/rules, no functional changes. -- gregor herrmann Mon, 16 Jun 2008 17:55:34 +0200 libxml-sax-writer-perl (0.50-1.1) unstable; urgency=low * Non-maintainer upload. * debian/rules: + Don't fail when perl is smart enough not to create empty dirs. (Closes: #467767) -- Marc 'HE' Brockschmidt Sat, 05 Apr 2008 17:22:58 +0200 libxml-sax-writer-perl (0.50-1) unstable; urgency=low * New upstream release. + Remove dpatch against t/05basic.t - got merged upstream. * Fix bogous dpatch (Closes: #413480). -- Florian Ragwitz Sun, 22 Jul 2007 15:51:07 +0200 libxml-sax-writer-perl (0.44-8) unstable; urgency=low * Bump Standards-Version to 3.7.2 (no changes). * Split up Build-Depends in Build-Depends and Build-Depends-Indep. * Added dpatch to Build-Depends. * Make dpatches out off all previous patches. * Added debian/patches/convert_errors.dpatch to explain how to handle encoding errors (Closes: #346474). * Changed debian/rules to use dpatch. * Properly clean test files generated by the testsuite. -- Florian Ragwitz Thu, 15 Jun 2006 18:13:22 +0200 libxml-sax-writer-perl (0.44-7) unstable; urgency=low * New Maintainer (Closes: #300238). * Don't install the README. It contains nonrelevant information. * Rewritten debian/rules on top of a dh-make-perl template. Now debian/libxml-sax-writer-perl.install isn't needed anymore. * Removed strange chars from documentation so man(1) is happy again. -- Florian Ragwitz Mon, 31 Oct 2005 14:51:18 +0100 libxml-sax-writer-perl (0.44-6) unstable; urgency=medium * QA Upload * Change maintainer to QA group * Bump Standards-Version to 3.6.2 (no changes) * Use patch from CPAN bug tracking system to fix test failures with newer Text::Iconv versions (Closes: #318550) -- Frank Lichtenheld Tue, 16 Aug 2005 17:28:32 +0200 libxml-sax-writer-perl (0.44-5) unstable; urgency=low * Adds debian/watch file so uscan will work -- Jay Bonci Wed, 27 Oct 2004 16:44:30 -0400 libxml-sax-writer-perl (0.44-4) unstable; urgency=low * Fixes dependancy problem on libtest-simple-perl (Closes: #240533) * Uses Test::More, now in perl-modules * Removed dependancy (leaving Build-Depends) on the test module. -- Jay Bonci Mon, 19 Apr 2004 13:38:51 -0400 libxml-sax-writer-perl (0.44-3) unstable; urgency=low * New maintainer (Closes: Bug#210544) * Added Jay Bonci as co-maintainer * Add '>:encoding(EncodeTo)' line discipline to FileConsumer to defeat perl's automatic charset conversion. Thanks to Michael Fowler. (Closes: Bug#196373) * Add trailing newline to xml declaration and to file/handle finalize() * Change quote marks in xml declaration to "" to match most W3C examples * debian/control: upgraded to Debian Policy 3.6.1 (no changes) -- Michael K. Edwards Mon, 19 Jan 2004 00:41:30 -0800 libxml-sax-writer-perl (0.44-2) unstable; urgency=low * debian/rules: moved debhelper compatibility level setting to 'debian/compat' per latest debhelper best practices * debian/control: updated sections according to latest archive changes: - 'libxml-sax-writer-perl' from 'interpreters' to 'perl' * debian/control: upgraded build dependency on 'debhelper' to '>= 4.1' * debian/control: upgraded to Debian Policy 3.6.0 (no changes) -- Ardo van Rangelrooij Sat, 6 Sep 2003 10:49:29 -0500 libxml-sax-writer-perl (0.44-1) unstable; urgency=low * New upstream release * debian/control: added (build) dependency on 'libxml-filter-buffertext-perl' * debian/rules: upgraded to debhelper v4 * debian/control: changed build dependency on debhelper accordingly * debian/rules: migrated from 'dh_movefiles' to 'dh_install' * debian/rules: split off 'install' target from 'binary-indep' target * debian/copyright: added pointer to license (closes: Bug#157677) -- Ardo van Rangelrooij Wed, 25 Sep 2002 06:49:11 -0500 libxml-sax-writer-perl (0.39-1) unstable; urgency=low * New upstream release * debian/control: added libtest-simple-perl to build depndencies -- Ardo van Rangelrooij Thu, 21 Feb 2002 21:19:25 -0600 libxml-sax-writer-perl (0.35-1) unstable; urgency=low * Initial release -- Ardo van Rangelrooij Tue, 1 Jan 2002 09:49:19 -0600 debian/source/0000755000000000000000000000000011434325134010466 5ustar debian/source/format0000644000000000000000000000001411432021152011663 0ustar 3.0 (quilt) debian/rules0000755000000000000000000000003611432252002010234 0ustar #!/usr/bin/make -f %: dh $@