summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo van der Sanden <hv@crypt.compulink.co.uk>1997-03-06 07:55:25 +0000
committerChip Salzenberg <chip@atlantic.net>1997-03-01 18:40:49 +1200
commit456e8aa72f2beaf704043243be43dba10a5d648f (patch)
treea004b47393850149358c6a2227260c686b19375d
parent0d72c55d125e399044812b52df01929239edc03e (diff)
downloadperl-456e8aa72f2beaf704043243be43dba10a5d648f.tar.gz
Fix quotewords
Subject: Re: Fix for ::SUPER with UNIVERSAL In <199703052319.SAA32568@rio.atlantic.net>, Chip Salzenberg writes: :Cute. It turns out that FileHandle and IO::Handle were okay, but the :handling of ::SUPER (which is used by IO::Handle::new) was broken in :the face of UNIVERSAL. : :Here's a patch. That fixes it. Here's one back - I think Text::ParseWords->quotewords is more broken than this, but it's a start. p5p-msgid: 199703060755.HAA15060@crypt.compulink.co.uk
-rw-r--r--lib/Text/ParseWords.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Text/ParseWords.pm b/lib/Text/ParseWords.pm
index f86c8c2991..f2e1514972 100644
--- a/lib/Text/ParseWords.pm
+++ b/lib/Text/ParseWords.pm
@@ -95,12 +95,12 @@ sub quotewords {
while (length($_)) {
$field = '';
for (;;) {
- $snippet = '';
- if (s/^"(([^"\\]|\\[\\"])*)"//) {
+ $snippet = '';
+ if (s/^"(([^"\\]|\\.)*)"//) {
$snippet = $1;
$snippet = "\"$snippet\"" if ($keep);
}
- elsif (s/^'(([^'\\]|\\[\\'])*)'//) {
+ elsif (s/^'(([^'\\]|\\.)*)'//) {
$snippet = $1;
$snippet = "'$snippet'" if ($keep);
}