Subject: | XML::Parser::Lite fails tests under perl 5.14 RC1 |
I got the following error when testing under perl 5.14:
Can't use string ("1") as an ARRAY ref while "strict refs" in use at
(re_eval 11) line 1.
The attached patch (to tests) makes the error go away, but I'm not sure
that there isn't a bug here.
$^R was set to the return value of $handler_of{End} when processing the
second opening <foo> tag, which is 1 for the push statement (the number
of items pushed onto the list), so the expression @{$^R||[]} caused this
error.
Subject: | soap_lite.diff |
--- t/XML/Parser/Lite.t
+++ t/XML/Parser/Lite.t
@@ -24,7 +24,7 @@
Final => sub { push @final_from, 1; },
Char => sub { push @text_from, $_[1]; },
Start => sub { push @start_from, $_[1]; },
- End => sub { push @end_from, $_[1]; },
+ End => sub { push @end_from, $_[1]; return },
);
$parser->setHandlers( Final => undef, );
$parser->setHandlers( %handler_of );