New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Text::ParseWords does not handle backslashed newline inside quoted text #7385
Comments
From farghorn@yahoo.comI am trying to parse a "line" (really a string) of "field1" "field2\ I looked at the source, and the main regex in At first, I tested out changing the regex to use the I then noticed that just a plain linefeed, not Here is a patch: *** ../app/perl/lib/5.8.2/Text/ParseWords.pm Thu ($quote, $quoted, undef, $unquoted, $delim, ($quote, $quoted, undef, $unquoted, $delim, __END__ Perl Info
|
farghorn@yahoo.com - Status changed from 'new' to 'open' |
farghorn@yahoo.com - Status changed from 'open' to 'new' |
From @mhxOn 2004-06-24, at 07:40:12 -0000, Ephraim Dan (via RT) wrote:
Thanks for your report. First of all, please try to use a different mailer next time you My head is still aching from trying to read this one. The bug has been fixed by the patch below using your suggestion Marcus Change 22992 by mhx@mhx-r2d2 on 2004/06/24 19:51:06 Fix for: [perl #30442] Text::ParseWords does not handle backslashed newline inside quoted text Affected files ... ... //depot/perl/lib/Text/ParseWords.pm#16 edit Differences ... ==== //depot/perl/lib/Text/ParseWords.pm#16 (text) ==== @@ -1,7 +1,7 @@ use vars qw($VERSION @ISA @EXPORT $PERL_SINGLE_QUOTE); require 5.000; @@ -59,11 +59,11 @@ ($quote, $quoted, undef, $unquoted, $delim, undef) = ==== //depot/perl/lib/Text/ParseWords.t#2 (xtext) ==== @@ -8,7 +8,7 @@ -print "1..18\n"; @words = shellwords(qq(foo "bar quiz" zoo)); |
The RT System itself - Status changed from 'new' to 'open' |
@mhx - Status changed from 'open' to 'resolved' |
From @hvdsMarcus Holland-Moritz <mhx-perl@gmx.net> wrote: It might make these patterns clearer to add a /s flag, replace C< . > Hugo |
From @mhxOn 2004-06-25, at 15:05:49 +0100, hv@crypt.org wrote:
Absolutely. The change below does just that, and in addition makes parse_line() Marcus Change 22997 by mhx@mhx-r2d2 on 2004/06/25 20:27:05 Cleanup the main regex in Text::ParseWords and make the Affected files ... ... //depot/perl/lib/Text/ParseWords.pm#17 edit Differences ... ==== //depot/perl/lib/Text/ParseWords.pm#17 (text) ==== @@ -1,7 +1,7 @@ use vars qw($VERSION @ISA @EXPORT $PERL_SINGLE_QUOTE); require 5.000; @@ -53,32 +53,27 @@ my($delimiter, $keep, $line) = @_; while (length($line)) { - ($quote, $quoted, undef, $unquoted, $delim, undef) = ==== //depot/perl/lib/Text/ParseWords.t#3 (xtext) ==== @@ -8,7 +8,7 @@ -print "1..20\n"; @words = shellwords(qq(foo "bar quiz" zoo)); |
Migrated from rt.perl.org#30442 (status was 'resolved')
Searchable as RT30442$
The text was updated successfully, but these errors were encountered: