r31261 - in /branches/upstream/libxml-sax-perl/current: ./ SAX/ SAX/PurePerl/ SAX/PurePerl/Reader/ XML-SAX-Base/ t/
antonio-guest at users.alioth.debian.org
antonio-guest at users.alioth.debian.org
Sun Mar 1 01:12:51 UTC 2009
Author: antonio-guest
Date: Sun Mar 1 01:12:48 2009
New Revision: 31261
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=31261
Log:
[svn-upgrade] Integrating new upstream version, libxml-sax-perl (0.96+dfsg)
Modified:
branches/upstream/libxml-sax-perl/current/Changes
branches/upstream/libxml-sax-perl/current/META.yml
branches/upstream/libxml-sax-perl/current/SAX.pm
branches/upstream/libxml-sax-perl/current/SAX/DocumentLocator.pm
branches/upstream/libxml-sax-perl/current/SAX/Intro.pod
branches/upstream/libxml-sax-perl/current/SAX/ParserFactory.pm
branches/upstream/libxml-sax-perl/current/SAX/PurePerl.pm
branches/upstream/libxml-sax-perl/current/SAX/PurePerl/DTDDecls.pm
branches/upstream/libxml-sax-perl/current/SAX/PurePerl/DebugHandler.pm
branches/upstream/libxml-sax-perl/current/SAX/PurePerl/DocType.pm
branches/upstream/libxml-sax-perl/current/SAX/PurePerl/EncodingDetect.pm
branches/upstream/libxml-sax-perl/current/SAX/PurePerl/Exception.pm
branches/upstream/libxml-sax-perl/current/SAX/PurePerl/NoUnicodeExt.pm
branches/upstream/libxml-sax-perl/current/SAX/PurePerl/Productions.pm
branches/upstream/libxml-sax-perl/current/SAX/PurePerl/Reader.pm
branches/upstream/libxml-sax-perl/current/SAX/PurePerl/Reader/NoUnicodeExt.pm
branches/upstream/libxml-sax-perl/current/SAX/PurePerl/Reader/Stream.pm
branches/upstream/libxml-sax-perl/current/SAX/PurePerl/Reader/String.pm
branches/upstream/libxml-sax-perl/current/SAX/PurePerl/Reader/URI.pm
branches/upstream/libxml-sax-perl/current/SAX/PurePerl/Reader/UnicodeExt.pm
branches/upstream/libxml-sax-perl/current/SAX/PurePerl/UnicodeExt.pm
branches/upstream/libxml-sax-perl/current/SAX/PurePerl/XMLDecl.pm
branches/upstream/libxml-sax-perl/current/XML-SAX-Base/Makefile.PL
branches/upstream/libxml-sax-perl/current/t/00basic.t
branches/upstream/libxml-sax-perl/current/t/14encoding.t
branches/upstream/libxml-sax-perl/current/t/42entities.t
Modified: branches/upstream/libxml-sax-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-sax-perl/current/Changes?rev=31261&op=diff
==============================================================================
--- branches/upstream/libxml-sax-perl/current/Changes (original)
+++ branches/upstream/libxml-sax-perl/current/Changes Sun Mar 1 01:12:48 2009
@@ -1,4 +1,24 @@
Revision history for Perl extension XML::SAX.
+
+0.96 06 Aug 2008 Grant McLean
+ - Fix breakage of Unicode regexes on 5.6 (introduced in 0.95 release)
+
+0.95 05 Aug 2008 Grant McLean
+ - XML::SAX::PurePerl fixes:
+ - RT#37147: Fix handling of numeric character entities in attribute
+ values (report from Jools Smyth)
+ - RT#19442: Fix for numeric character entities spanning end of buffer
+ (report from Eivind Eklund)
+ - RT#29316: Performance fix for parsing from large strings (patch from
+ Gordon Lack)
+ - RT#26588: Fix for UTF8 bytes in first 4096 bytes of document not being
+ decoded to Perl-UTF8-characters (patch from Niko Tyni of the
+ Debian project)
+ - RT#37545: incorrect operator precedence breaks single quotes around
+ DTD entity declarations (report from Kevin Ryde)
+ - RT#28477: Fix test in ParserFactory.pm for parser module loaded (report
+ from Douglas Wilson)
+ - RT#28564: Fix XML::SAX::PurePerl versioning (report from Chapman Flack)
0.16 27 Jun 2007 Grant McLean
- Applied patch for PI handling from RT#19173
Modified: branches/upstream/libxml-sax-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-sax-perl/current/META.yml?rev=31261&op=diff
==============================================================================
--- branches/upstream/libxml-sax-perl/current/META.yml (original)
+++ branches/upstream/libxml-sax-perl/current/META.yml Sun Mar 1 01:12:48 2009
@@ -1,7 +1,7 @@
# http://module-build.sourceforge.net/META-spec.html
#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
name: XML-SAX
-version: 0.16
+version: 0.96
version_from: SAX.pm
installdirs: site
requires:
@@ -9,4 +9,4 @@
XML::NamespaceSupport: 0.03
distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.17
+generated_by: ExtUtils::MakeMaker version 6.30_01
Modified: branches/upstream/libxml-sax-perl/current/SAX.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-sax-perl/current/SAX.pm?rev=31261&op=diff
==============================================================================
--- branches/upstream/libxml-sax-perl/current/SAX.pm (original)
+++ branches/upstream/libxml-sax-perl/current/SAX.pm Sun Mar 1 01:12:48 2009
@@ -1,11 +1,11 @@
-# $Id: SAX.pm,v 1.29 2007/06/27 09:09:12 grant Exp $
+# $Id: SAX.pm,v 1.31 2008-08-05 12:36:24 grant Exp $
package XML::SAX;
use strict;
use vars qw($VERSION @ISA @EXPORT_OK);
-$VERSION = '0.16';
+$VERSION = '0.96';
use Exporter ();
@ISA = ('Exporter');
Modified: branches/upstream/libxml-sax-perl/current/SAX/DocumentLocator.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-sax-perl/current/SAX/DocumentLocator.pm?rev=31261&op=diff
==============================================================================
--- branches/upstream/libxml-sax-perl/current/SAX/DocumentLocator.pm (original)
+++ branches/upstream/libxml-sax-perl/current/SAX/DocumentLocator.pm Sun Mar 1 01:12:48 2009
@@ -1,4 +1,4 @@
-# $Id: DocumentLocator.pm,v 1.3 2005/10/14 20:31:20 matt Exp $
+# $Id: DocumentLocator.pm,v 1.3 2005-10-14 20:31:20 matt Exp $
package XML::SAX::DocumentLocator;
use strict;
Modified: branches/upstream/libxml-sax-perl/current/SAX/Intro.pod
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-sax-perl/current/SAX/Intro.pod?rev=31261&op=diff
==============================================================================
--- branches/upstream/libxml-sax-perl/current/SAX/Intro.pod (original)
+++ branches/upstream/libxml-sax-perl/current/SAX/Intro.pod Sun Mar 1 01:12:48 2009
@@ -348,7 +348,7 @@
his article on XML.com here <URI>.
To construct SAX pipelines, Barrie Slaymaker, a long time Perl hacker
-who's modules you will probably have heard of or used, wrote a very
+whose modules you will probably have heard of or used, wrote a very
clever module called XML::SAX::Machines. This combines some really
clever SAX filter-type modules, with a construction toolkit for filters
that makes building pipelines easy. But before we see how it makes
@@ -402,6 +402,6 @@
Matt Sergeant, matt at sergeant.org
-$Id: Intro.pod,v 1.3 2002/04/30 07:16:00 matt Exp $
+$Id: Intro.pod,v 1.4 2008-08-04 10:28:01 grant Exp $
=cut
Modified: branches/upstream/libxml-sax-perl/current/SAX/ParserFactory.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-sax-perl/current/SAX/ParserFactory.pm?rev=31261&op=diff
==============================================================================
--- branches/upstream/libxml-sax-perl/current/SAX/ParserFactory.pm (original)
+++ branches/upstream/libxml-sax-perl/current/SAX/ParserFactory.pm Sun Mar 1 01:12:48 2009
@@ -1,4 +1,4 @@
-# $Id: ParserFactory.pm,v 1.13 2002/11/19 18:25:47 matt Exp $
+# $Id: ParserFactory.pm,v 1.14 2008-08-04 04:51:29 grant Exp $
package XML::SAX::ParserFactory;
@@ -33,11 +33,9 @@
$version = " $1";
}
- {
- no strict 'refs';
- if (!keys %{"${parser_class}::"}) {
- eval "use $parser_class $version;";
- }
+ if (!$parser_class->can('new')) {
+ eval "require $parser_class $version;";
+ die $@ if $@;
}
return $parser_class->new(@parser_params);
Modified: branches/upstream/libxml-sax-perl/current/SAX/PurePerl.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-sax-perl/current/SAX/PurePerl.pm?rev=31261&op=diff
==============================================================================
--- branches/upstream/libxml-sax-perl/current/SAX/PurePerl.pm (original)
+++ branches/upstream/libxml-sax-perl/current/SAX/PurePerl.pm Sun Mar 1 01:12:48 2009
@@ -1,13 +1,13 @@
-# $Id: PurePerl.pm,v 1.23 2007/06/27 09:08:00 grant Exp $
+# $Id: PurePerl.pm,v 1.28 2008-08-05 12:36:51 grant Exp $
package XML::SAX::PurePerl;
use strict;
use vars qw/$VERSION/;
-$VERSION = '0.92';
-
-use XML::SAX::PurePerl::Productions qw($Any $CharMinusDash $SingleChar);
+$VERSION = '0.96';
+
+use XML::SAX::PurePerl::Productions qw($NameChar $SingleChar);
use XML::SAX::PurePerl::Reader;
use XML::SAX::PurePerl::EncodingDetect ();
use XML::SAX::Exception;
@@ -374,6 +374,11 @@
return 0 unless $reader->match('&');
my $data = $reader->data;
+
+ # Fetch more data if we have an incomplete numeric reference
+ if ($data =~ /^(#\d*|#x[0-9a-fA-F]*)$/) {
+ $data = $reader->data(length($data) + 6);
+ }
if ($data =~ /^#x([0-9a-fA-F]+);/) {
my $ref = $1;
@@ -580,7 +585,7 @@
}
$value =~ s/[\x09\x0A\x0D]/\x20/g;
- $value =~ s/&(#(x[0-9a-fA-F]+)|([0-9]+)|\w+);/$self->AttReference($1, $reader)/geo;
+ $value =~ s/&(#(x[0-9a-fA-F]+)|#([0-9]+)|\w+);/$self->AttReference($1, $reader)/geo;
return $value;
}
@@ -663,7 +668,7 @@
while(1) {
my $data = $reader->data;
return unless length($data);
- $data =~ /^([^\s>\/&\?;=<\)\(\[\],\%\#\!\*]*)/ or return;
+ $data =~ /^([^\s>\/&\?;=<\)\(\[\],\%\#\!\*\|]*)/ or return;
$name .= $1;
my $len = length($1);
$reader->move_along($len);
Modified: branches/upstream/libxml-sax-perl/current/SAX/PurePerl/DTDDecls.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-sax-perl/current/SAX/PurePerl/DTDDecls.pm?rev=31261&op=diff
==============================================================================
--- branches/upstream/libxml-sax-perl/current/SAX/PurePerl/DTDDecls.pm (original)
+++ branches/upstream/libxml-sax-perl/current/SAX/PurePerl/DTDDecls.pm Sun Mar 1 01:12:48 2009
@@ -1,9 +1,9 @@
-# $Id: DTDDecls.pm,v 1.7 2005/10/14 20:31:20 matt Exp $
+# $Id: DTDDecls.pm,v 1.9 2008-08-05 12:37:13 grant Exp $
package XML::SAX::PurePerl;
use strict;
-use XML::SAX::PurePerl::Productions qw($NameChar $SingleChar);
+use XML::SAX::PurePerl::Productions qw($SingleChar);
sub elementdecl {
my ($self, $reader) = @_;
@@ -469,7 +469,7 @@
my $data = $reader->data;
my $quote = '"';
my $re = $quotre;
- if (!$data =~ /^"/) {
+ if ($data !~ /^"/) {
$data =~ /^'/ or $self->parser_error("Not a quote character", $reader);
$quote = "'";
$re = $aposre;
Modified: branches/upstream/libxml-sax-perl/current/SAX/PurePerl/DebugHandler.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-sax-perl/current/SAX/PurePerl/DebugHandler.pm?rev=31261&op=diff
==============================================================================
--- branches/upstream/libxml-sax-perl/current/SAX/PurePerl/DebugHandler.pm (original)
+++ branches/upstream/libxml-sax-perl/current/SAX/PurePerl/DebugHandler.pm Sun Mar 1 01:12:48 2009
@@ -1,4 +1,4 @@
-# $Id: DebugHandler.pm,v 1.3 2001/11/24 17:47:53 matt Exp $
+# $Id: DebugHandler.pm,v 1.3 2001-11-24 17:47:53 matt Exp $
package XML::SAX::PurePerl::DebugHandler;
Modified: branches/upstream/libxml-sax-perl/current/SAX/PurePerl/DocType.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-sax-perl/current/SAX/PurePerl/DocType.pm?rev=31261&op=diff
==============================================================================
--- branches/upstream/libxml-sax-perl/current/SAX/PurePerl/DocType.pm (original)
+++ branches/upstream/libxml-sax-perl/current/SAX/PurePerl/DocType.pm Sun Mar 1 01:12:48 2009
@@ -1,4 +1,4 @@
-# $Id: DocType.pm,v 1.3 2003/07/30 13:39:22 matt Exp $
+# $Id: DocType.pm,v 1.3 2003-07-30 13:39:22 matt Exp $
package XML::SAX::PurePerl;
Modified: branches/upstream/libxml-sax-perl/current/SAX/PurePerl/EncodingDetect.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-sax-perl/current/SAX/PurePerl/EncodingDetect.pm?rev=31261&op=diff
==============================================================================
--- branches/upstream/libxml-sax-perl/current/SAX/PurePerl/EncodingDetect.pm (original)
+++ branches/upstream/libxml-sax-perl/current/SAX/PurePerl/EncodingDetect.pm Sun Mar 1 01:12:48 2009
@@ -1,4 +1,4 @@
-# $Id: EncodingDetect.pm,v 1.6 2007/02/07 09:33:50 grant Exp $
+# $Id: EncodingDetect.pm,v 1.6 2007-02-07 09:33:50 grant Exp $
package XML::SAX::PurePerl; # NB, not ::EncodingDetect!
Modified: branches/upstream/libxml-sax-perl/current/SAX/PurePerl/Exception.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-sax-perl/current/SAX/PurePerl/Exception.pm?rev=31261&op=diff
==============================================================================
--- branches/upstream/libxml-sax-perl/current/SAX/PurePerl/Exception.pm (original)
+++ branches/upstream/libxml-sax-perl/current/SAX/PurePerl/Exception.pm Sun Mar 1 01:12:48 2009
@@ -1,4 +1,4 @@
-# $Id: Exception.pm,v 1.2 2001/11/14 11:07:25 matt Exp $
+# $Id: Exception.pm,v 1.2 2001-11-14 11:07:25 matt Exp $
package XML::SAX::PurePerl::Exception;
Modified: branches/upstream/libxml-sax-perl/current/SAX/PurePerl/NoUnicodeExt.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-sax-perl/current/SAX/PurePerl/NoUnicodeExt.pm?rev=31261&op=diff
==============================================================================
--- branches/upstream/libxml-sax-perl/current/SAX/PurePerl/NoUnicodeExt.pm (original)
+++ branches/upstream/libxml-sax-perl/current/SAX/PurePerl/NoUnicodeExt.pm Sun Mar 1 01:12:48 2009
@@ -1,4 +1,4 @@
-# $Id: NoUnicodeExt.pm,v 1.1 2002/01/30 17:35:21 matt Exp $
+# $Id: NoUnicodeExt.pm,v 1.1 2002-01-30 17:35:21 matt Exp $
package XML::SAX::PurePerl;
use strict;
Modified: branches/upstream/libxml-sax-perl/current/SAX/PurePerl/Productions.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-sax-perl/current/SAX/PurePerl/Productions.pm?rev=31261&op=diff
==============================================================================
--- branches/upstream/libxml-sax-perl/current/SAX/PurePerl/Productions.pm (original)
+++ branches/upstream/libxml-sax-perl/current/SAX/PurePerl/Productions.pm Sun Mar 1 01:12:48 2009
@@ -1,10 +1,10 @@
-# $Id: Productions.pm,v 1.11 2003/07/30 13:39:22 matt Exp $
+# $Id: Productions.pm,v 1.13 2008-08-05 12:37:13 grant Exp $
package XML::SAX::PurePerl::Productions;
use Exporter;
@ISA = ('Exporter');
- at EXPORT_OK = qw($S $Char $VersionNum $BaseChar $Letter $Ideographic
+ at EXPORT_OK = qw($S $Char $VersionNum $BaseChar $Ideographic
$Extender $Digit $CombiningChar $EncNameStart $EncNameEnd $NameChar $CharMinusDash
$PubidChar $Any $SingleChar);
@@ -36,12 +36,10 @@
$Digit = qr/ [\x30-\x39] /x;
- $Letter = qr/^ $BaseChar $/x;
-
# can't do this one without unicode
# $CombiningChar = qr/^$/msx;
- $NameChar = qr/^ $BaseChar | $Digit | [._:-] | $Extender $/x;
+ $NameChar = qr/^ (?: $BaseChar | $Digit | [._:-] | $Extender )+ $/x;
PERL
die $@ if $@;
}
@@ -138,9 +136,7 @@
[\x{4E00}-\x{9FA5}\x{3007}\x{3021}-\x{3029}]
/x;
- $Letter = qr/^ $BaseChar | $Ideographic $/x;
-
- $NameChar = qr/^ $Letter | $Digit | [._:-] | $CombiningChar | $Extender $/x;
+ $NameChar = qr/^ (?: $BaseChar | $Ideographic | $Digit | [._:-] | $CombiningChar | $Extender )+ $/x;
PERL
die $@ if $@;
Modified: branches/upstream/libxml-sax-perl/current/SAX/PurePerl/Reader.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-sax-perl/current/SAX/PurePerl/Reader.pm?rev=31261&op=diff
==============================================================================
--- branches/upstream/libxml-sax-perl/current/SAX/PurePerl/Reader.pm (original)
+++ branches/upstream/libxml-sax-perl/current/SAX/PurePerl/Reader.pm Sun Mar 1 01:12:48 2009
@@ -1,10 +1,9 @@
-# $Id: Reader.pm,v 1.11 2005/10/14 20:31:20 matt Exp $
+# $Id: Reader.pm,v 1.13 2008-08-05 12:37:13 grant Exp $
package XML::SAX::PurePerl::Reader;
use strict;
use XML::SAX::PurePerl::Reader::URI;
-use XML::SAX::PurePerl::Productions qw( $SingleChar $Letter $NameChar );
use Exporter ();
use vars qw(@ISA @EXPORT_OK);
Modified: branches/upstream/libxml-sax-perl/current/SAX/PurePerl/Reader/NoUnicodeExt.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-sax-perl/current/SAX/PurePerl/Reader/NoUnicodeExt.pm?rev=31261&op=diff
==============================================================================
--- branches/upstream/libxml-sax-perl/current/SAX/PurePerl/Reader/NoUnicodeExt.pm (original)
+++ branches/upstream/libxml-sax-perl/current/SAX/PurePerl/Reader/NoUnicodeExt.pm Sun Mar 1 01:12:48 2009
@@ -1,4 +1,4 @@
-# $Id: NoUnicodeExt.pm,v 1.3 2003/07/30 13:39:23 matt Exp $
+# $Id: NoUnicodeExt.pm,v 1.3 2003-07-30 13:39:23 matt Exp $
package XML::SAX::PurePerl::Reader;
use strict;
Modified: branches/upstream/libxml-sax-perl/current/SAX/PurePerl/Reader/Stream.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-sax-perl/current/SAX/PurePerl/Reader/Stream.pm?rev=31261&op=diff
==============================================================================
--- branches/upstream/libxml-sax-perl/current/SAX/PurePerl/Reader/Stream.pm (original)
+++ branches/upstream/libxml-sax-perl/current/SAX/PurePerl/Reader/Stream.pm Sun Mar 1 01:12:48 2009
@@ -1,4 +1,4 @@
-# $Id: Stream.pm,v 1.7 2005/10/14 20:31:20 matt Exp $
+# $Id: Stream.pm,v 1.7 2005-10-14 20:31:20 matt Exp $
package XML::SAX::PurePerl::Reader::Stream;
Modified: branches/upstream/libxml-sax-perl/current/SAX/PurePerl/Reader/String.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-sax-perl/current/SAX/PurePerl/Reader/String.pm?rev=31261&op=diff
==============================================================================
--- branches/upstream/libxml-sax-perl/current/SAX/PurePerl/Reader/String.pm (original)
+++ branches/upstream/libxml-sax-perl/current/SAX/PurePerl/Reader/String.pm Sun Mar 1 01:12:48 2009
@@ -1,4 +1,4 @@
-# $Id: String.pm,v 1.5 2003/07/30 13:39:23 matt Exp $
+# $Id: String.pm,v 1.6 2008-08-04 03:35:44 grant Exp $
package XML::SAX::PurePerl::Reader::String;
@@ -15,23 +15,40 @@
@ISA = ('XML::SAX::PurePerl::Reader');
-use constant DISCARDED => 7;
+use constant DISCARDED => 8;
+use constant STRING => 9;
+use constant USED => 10;
+use constant CHUNK_SIZE => 2048;
sub new {
my $class = shift;
my $string = shift;
my @parts;
- @parts[BUFFER, EOF, LINE, COLUMN, DISCARDED] =
- ($string, 0, 1, 0, '');
+ @parts[BUFFER, EOF, LINE, COLUMN, DISCARDED, STRING, USED] =
+ ('', 0, 1, 0, 0, $string, 0);
return bless \@parts, $class;
}
-sub read_more () { }
+sub read_more () {
+ my $self = shift;
+ if ($self->[USED] >= length($self->[STRING])) {
+ $self->[EOF]++;
+ return 0;
+ }
+ my $bytes = CHUNK_SIZE;
+ if ($bytes > (length($self->[STRING]) - $self->[USED])) {
+ $bytes = (length($self->[STRING]) - $self->[USED]);
+ }
+ $self->[BUFFER] .= substr($self->[STRING], $self->[USED], $bytes);
+ $self->[USED] += $bytes;
+ return 1;
+ }
+
sub move_along {
- my $self = shift;
- my $discarded = substr($self->[BUFFER], 0, $_[0], '');
- $self->[DISCARDED] .= $discarded;
+ my($self, $bytes) = @_;
+ my $discarded = substr($self->[BUFFER], 0, $bytes, '');
+ $self->[DISCARDED] += length($discarded);
# Wish I could skip this lot - tells us where we are in the file
my $lines = $discarded =~ tr/\n//;
@@ -55,7 +72,7 @@
sub bytepos {
my $self = shift;
- length($self->[DISCARDED]);
+ $self->[DISCARDED];
}
1;
Modified: branches/upstream/libxml-sax-perl/current/SAX/PurePerl/Reader/URI.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-sax-perl/current/SAX/PurePerl/Reader/URI.pm?rev=31261&op=diff
==============================================================================
--- branches/upstream/libxml-sax-perl/current/SAX/PurePerl/Reader/URI.pm (original)
+++ branches/upstream/libxml-sax-perl/current/SAX/PurePerl/Reader/URI.pm Sun Mar 1 01:12:48 2009
@@ -1,4 +1,4 @@
-# $Id: URI.pm,v 1.1 2001/11/11 18:41:51 matt Exp $
+# $Id: URI.pm,v 1.1 2001-11-11 18:41:51 matt Exp $
package XML::SAX::PurePerl::Reader::URI;
Modified: branches/upstream/libxml-sax-perl/current/SAX/PurePerl/Reader/UnicodeExt.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-sax-perl/current/SAX/PurePerl/Reader/UnicodeExt.pm?rev=31261&op=diff
==============================================================================
--- branches/upstream/libxml-sax-perl/current/SAX/PurePerl/Reader/UnicodeExt.pm (original)
+++ branches/upstream/libxml-sax-perl/current/SAX/PurePerl/Reader/UnicodeExt.pm Sun Mar 1 01:12:48 2009
@@ -1,9 +1,9 @@
-# $Id: UnicodeExt.pm,v 1.4 2003/07/30 13:39:23 matt Exp $
+# $Id: UnicodeExt.pm,v 1.5 2008-08-04 10:04:54 grant Exp $
package XML::SAX::PurePerl::Reader;
use strict;
-use Encode;
+use Encode ();
sub set_raw_stream {
my ($fh) = @_;
@@ -16,7 +16,7 @@
}
sub switch_encoding_string {
- Encode::from_to($_[0], $_[1], "utf-8");
+ $_[0] = Encode::decode($_[1], $_[0]);
}
1;
Modified: branches/upstream/libxml-sax-perl/current/SAX/PurePerl/UnicodeExt.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-sax-perl/current/SAX/PurePerl/UnicodeExt.pm?rev=31261&op=diff
==============================================================================
--- branches/upstream/libxml-sax-perl/current/SAX/PurePerl/UnicodeExt.pm (original)
+++ branches/upstream/libxml-sax-perl/current/SAX/PurePerl/UnicodeExt.pm Sun Mar 1 01:12:48 2009
@@ -1,4 +1,4 @@
-# $Id: UnicodeExt.pm,v 1.1 2002/01/30 17:35:21 matt Exp $
+# $Id: UnicodeExt.pm,v 1.1 2002-01-30 17:35:21 matt Exp $
package XML::SAX::PurePerl;
use strict;
Modified: branches/upstream/libxml-sax-perl/current/SAX/PurePerl/XMLDecl.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-sax-perl/current/SAX/PurePerl/XMLDecl.pm?rev=31261&op=diff
==============================================================================
--- branches/upstream/libxml-sax-perl/current/SAX/PurePerl/XMLDecl.pm (original)
+++ branches/upstream/libxml-sax-perl/current/SAX/PurePerl/XMLDecl.pm Sun Mar 1 01:12:48 2009
@@ -1,4 +1,4 @@
-# $Id: XMLDecl.pm,v 1.3 2003/07/30 13:39:22 matt Exp $
+# $Id: XMLDecl.pm,v 1.3 2003-07-30 13:39:22 matt Exp $
package XML::SAX::PurePerl;
Modified: branches/upstream/libxml-sax-perl/current/XML-SAX-Base/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-sax-perl/current/XML-SAX-Base/Makefile.PL?rev=31261&op=diff
==============================================================================
--- branches/upstream/libxml-sax-perl/current/XML-SAX-Base/Makefile.PL (original)
+++ branches/upstream/libxml-sax-perl/current/XML-SAX-Base/Makefile.PL Sun Mar 1 01:12:48 2009
@@ -1,4 +1,4 @@
-# $Id: Makefile.PL,v 1.15 2007/02/07 09:33:50 grant Exp $
+# $Id: Makefile.PL,v 1.15 2007-02-07 09:33:50 grant Exp $
use strict;
Modified: branches/upstream/libxml-sax-perl/current/t/00basic.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-sax-perl/current/t/00basic.t?rev=31261&op=diff
==============================================================================
--- branches/upstream/libxml-sax-perl/current/t/00basic.t (original)
+++ branches/upstream/libxml-sax-perl/current/t/00basic.t Sun Mar 1 01:12:48 2009
@@ -1,6 +1,11 @@
use Test;
-BEGIN { plan tests => 1 }
-END { ok($loaded) }
+BEGIN { plan tests => 2 }
+END { ok($loaded == 2) }
use XML::SAX;
$loaded++;
+use XML::SAX::PurePerl;
+$loaded++;
+
+ok(XML::SAX->VERSION eq XML::SAX::PurePerl->VERSION);
+
Modified: branches/upstream/libxml-sax-perl/current/t/14encoding.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-sax-perl/current/t/14encoding.t?rev=31261&op=diff
==============================================================================
--- branches/upstream/libxml-sax-perl/current/t/14encoding.t (original)
+++ branches/upstream/libxml-sax-perl/current/t/14encoding.t Sun Mar 1 01:12:48 2009
@@ -1,23 +1,25 @@
use Test;
BEGIN { $tests = 0;
- if ($] >= 5.007002) { $tests = 7 }
+ if ($] >= 5.007002) { $tests = 9 }
plan tests => $tests;
}
if ($tests) {
use XML::SAX::PurePerl;
-use XML::SAX::PurePerl::DebugHandler;
-my $handler = XML::SAX::PurePerl::DebugHandler->new();
+my $handler = TestHandler->new(); # see below for the TestHandler class
ok($handler);
my $parser = XML::SAX::PurePerl->new(Handler => $handler);
ok($parser);
# warn("utf-16\n");
+# verify that the first element is correctly decoded
+$handler->{test_elements} = [ "\x{9031}\x{5831}" ];
$parser->parse_uri("testfiles/utf-16.xml");
ok(1);
# warn("utf-16le\n");
+$handler->{test_elements} = [ "foo" ];
$parser->parse_uri("testfiles/utf-16le.xml");
ok(1);
@@ -33,3 +35,19 @@
$parser->parse_uri("testfiles/iso8859_2.xml");
ok(1);
}
+
+package TestHandler;
+use XML::SAX::PurePerl::DebugHandler;
+use base qw(XML::SAX::PurePerl::DebugHandler);
+use Test;
+
+sub start_element {
+ my $self = shift;
+ if ($self->{test_elements} and
+ my $value = pop @{$self->{test_elements}}) {
+ ok($_[0]->{Name}, $value);
+ }
+ $self->SUPER::start_element(@_);
+}
+
+1;
Modified: branches/upstream/libxml-sax-perl/current/t/42entities.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-sax-perl/current/t/42entities.t?rev=31261&op=diff
==============================================================================
--- branches/upstream/libxml-sax-perl/current/t/42entities.t (original)
+++ branches/upstream/libxml-sax-perl/current/t/42entities.t Sun Mar 1 01:12:48 2009
@@ -12,10 +12,10 @@
my $parser = XML::SAX::PurePerl->new(Handler => $handler);
ok($parser);
-$parser->parse_string('<code amp="&" x3E=">" />');
+$parser->parse_string('<code amp="&" x3E=">" num="A" />');
ok(1); # parser didn't die
-my $expected = "amp=& x3E=> ";
+my $expected = "amp=& num=A x3E=> ";
ok($handler->attributes, $expected);
exit;
More information about the Pkg-perl-cvs-commits
mailing list