|Subject:||literal() wrong result on "qw (a b c)"|
|Date:||Thu, 08 Oct 2009 09:31:10 +1100|
|To:||bug-PPI [...] rt.cpan.org|
|From:||Kevin Ryde <user42 [...] zip.com.au>|
With PPI 1.206 and recent debian i386 perl 5.10.1, the program below prints (a,b,c where I hoped it would be a,b,c I think whitespace after qw like "qw (a b c)" is allowed, the same as with other "q"s, or at least it runs fine, and comes about as a,b,c.
use strict; use warnings; use PPI; my $document = PPI::Document->new (\'qw (a b c)') or die $@->message; my $words = $document->schild(0)->schild(0); print ref $words,"\n"; my @words = $words->literal; print join(',', @words),"\n"; exit 0;