Bug#127997: perl: Text::ParseWords::shellwords allows single quote char to be backslash-escaped inside single quotes (unlike shell)

Dominic Hargreaves dom at earth.li
Wed Jun 1 22:01:17 UTC 2011


On Thu, Nov 04, 2010 at 03:19:48PM +0200, Niko Tyni wrote:
> tag 127997 moreinfo
> thanks
> 
> On Sun, Jan 06, 2002 at 01:36:26AM -0900, Britton Leo Kerin wrote:
> > Package: perl
> > Version: 5.6.1-6
> > Severity: minor
> > 
> > I sort of like this bug, but it's not how sh works.
> 
> Sorry for the lack of action on this.
> 
> I can't reproduce this; with Text-ParseWords 3.2 that shipped with perl 5.6.1:
> 
> % perl -Ilib -MText::ParseWords -le "my @a = shellwords(qq(echo 'ab \' c')); print scalar @a"
> 0
> % perl -Ilib -MText::ParseWords -le "my @a = shellwords(qq(echo 'ab c')); print scalar @a" 
> 2
> 
> which IMO shows that the backslash-escaped single quote char in the first
> example made the parsing fail. I think this is the expected behaviour.
> 
> This is also the case with current Text-ParseWords versions.
> 
> Please let me know if I can close this bug.

I'm going to close this bug next week unless I hear objections.

-- 
Dominic Hargreaves | http://www.larted.org.uk/~dom/
PGP key 5178E2A5 from the.earth.li (keyserver,web,email)






More information about the Perl-maintainers mailing list