From 01116d61c64f47ea48953daafd22a543761a7ae4 Mon Sep 17 00:00:00 2001 From: Slaven Rezic Date: Sun, 3 Apr 2011 19:29:44 +0200 Subject: [PATCH] * make sure $^R stays undefined --- lib/XML/Parser/LiteCopy.pm | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/XML/Parser/LiteCopy.pm b/lib/XML/Parser/LiteCopy.pm index 8fad1e1..806fc15 100644 --- a/lib/XML/Parser/LiteCopy.pm +++ b/lib/XML/Parser/LiteCopy.pm @@ -100,17 +100,17 @@ sub _regexp { my $DeclCE = "--(?:$CommentCE)?|\\[CDATA\\[(?:$CDATA_CE)?|DOCTYPE(?:$DocTypeCE)?"; - my $PI_CE = "($Name(?:$PI_Tail))>(?{${package}::_pi(\$5)})"; + my $PI_CE = "($Name(?:$PI_Tail))>(?{${package}::_pi(\$5); undef})"; # these expressions were modified for backtracking and events - my $EndTagCE = "($Name)(?{${package}::_end(\$6)})(?:$S)?>"; + my $EndTagCE = "($Name)(?{${package}::_end(\$6); undef})(?:$S)?>"; my $AttValSE = "\"([^<\"]*)\"|'([^<']*)'"; my $ElemTagCE = "($Name)" . "(?:$S($Name)(?:$S)?=(?:$S)?(?:$AttValSE)" . "(?{[\@{\$^R||[]},\$8=>defined\$9?\$9:\$10]}))*(?:$S)?(/)?>" - . "(?{${package}::_start(\$7,\@{\$^R||[]}),\$^R=[]})(?{\$11 and ${package}::_end(\$7)})"; + . "(?{${package}::_start(\$7,\@{\$^R||[]}),\$^R=[]})(?{\$11 and ${package}::_end(\$7); undef})"; my $MarkupSPE = "<(?:!(?:$DeclCE)?|\\?(?:$PI_CE)?|/(?:$EndTagCE)?|(?:$ElemTagCE)?)"; -- 1.7.0.4