Skip Menu |

This queue is for tickets about the Text-ParseWords CPAN distribution.

Report information
The Basics
Id: 88485
Status: new
Priority: 0/
Queue: Text-ParseWords

People
Owner: Nobody in particular
Requestors: dom [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 3.29
Fixed in: (no value)



Subject: manpage unclear regarding $keep
From <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=125778>: From the second paragraph of the description: The $keep argument is a boolean flag. If true, then the tokens are split on the specified delimiter, but all other characters (quotes, backslashes, etc.) are kept in the tokens. If $keep is false then the &*quotewords() func­ tions remove all quotes and backslashes that are not them­ selves backslash-escaped or inside of single quotes (i.e., &quotewords() tries to interpret these characters just like the Bourne shell). If I understand correctly, the first parenthetical comment is not implying the existence of additional metacharacters understood by ParseWords beyond quotes and backslashes, only noting that *all* characters (including obviously all non-metacharacters) are passed through. If this is correct, then the 'etc.' is somewhat unfortunate and confusing and the parenthetical comment would be more understandable as 'including quotes and backslashes'. The description of the case where $keep is false seems to imply that quotes are indeed the only metacharacters ParseWords concerns itself with, but of course Bourne shell has more of them, and the mention of it is enough to make a person nervous. Trivial patch attached, to be applied if you agree.
Subject: Text-Parsewords-keep-clarification.patch
--- ParseWords.pm.orig 2013-09-07 18:58:51.000000000 +0100 +++ ParseWords.pm 2013-09-07 18:59:10.000000000 +0100 @@ -202,8 +202,8 @@ call. The $keep argument is a boolean flag. If true, then the tokens are -split on the specified delimiter, but all other characters (quotes, -backslashes, etc.) are kept in the tokens. If $keep is false then the +split on the specified delimiter, but all other characters (including +quote and backslashes) are kept in the tokens. If $keep is false then the &*quotewords() functions remove all quotes and backslashes that are not themselves backslash-escaped or inside of single quotes (i.e., &quotewords() tries to interpret these characters just like the Bourne
On Sat Sep 07 18:59:47 2013, DOM wrote: Show quoted text
> From <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=125778>: > > From the second paragraph of the description: > > The $keep argument is a boolean flag. If true, then the > tokens are split on the specified delimiter, but all other > characters (quotes, backslashes, etc.) are kept in the > tokens. If $keep is false then the &*quotewords() func­ > tions remove all quotes and backslashes that are not them­ > selves backslash-escaped or inside of single quotes (i.e., > &quotewords() tries to interpret these characters just > like the Bourne shell). > > If I understand correctly, the first parenthetical comment is not > implying the existence of additional metacharacters understood by > ParseWords beyond quotes and backslashes, only noting that *all* > characters (including obviously all non-metacharacters) are passed > through. If this is correct, then the 'etc.' is somewhat unfortunate > and confusing and the parenthetical comment would be more > understandable as 'including quotes and backslashes'. > > The description of the case where $keep is false seems to imply that > quotes are indeed the only metacharacters ParseWords concerns itself > with, but of course Bourne shell has more of them, and the mention of > it is enough to make a person nervous. > > Trivial patch attached, to be applied if you agree.
So trivial it had a typo in it :) Fixed version attached.
Subject: Text-Parsewords-keep-clarification.patch
--- ParseWords.pm.orig 2013-09-07 18:58:51.000000000 +0100 +++ ParseWords.pm 2013-09-07 19:00:10.000000000 +0100 @@ -202,8 +202,8 @@ call. The $keep argument is a boolean flag. If true, then the tokens are -split on the specified delimiter, but all other characters (quotes, -backslashes, etc.) are kept in the tokens. If $keep is false then the +split on the specified delimiter, but all other characters (including +quotes and backslashes) are kept in the tokens. If $keep is false then the &*quotewords() functions remove all quotes and backslashes that are not themselves backslash-escaped or inside of single quotes (i.e., &quotewords() tries to interpret these characters just like the Bourne