Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the PPI CPAN distribution.

Report information
The Basics
Id: 63943
Status: resolved
Priority: 0/
Queue: PPI

People
Owner: Nobody in particular
Requestors: dean [...] cs.serenevy.net
Cc:
AdminCc:

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



Subject: map and regexp confuse PPI?
This looks like it would be a PPI bug which is why I am reporting it here. #!/usr/bin/perl map /=["']?/, "foo"; sub { "executing..." }; $ perlver /tmp/test.pl -------------------------------------------- | file | explicit | syntax | external | | -------------------------------------------- | | /tmp/test.pl | ~ | v5.12.0 | n/a | | -------------------------------------------- | | Minimum explicit version : ~ | | Minimum syntax version : v5.12.0 | | Minimum version of perl : v5.12.0 | -------------------------------------------- $ perlver --blame /tmp/test.pl ------------------------------------------------------------ File : /tmp/test.pl Line : 3 Char : 17 Rule : _yada_yada_yada ------------------------------------------------------------ ... ------------------------------------------------------------ libppi-perl - module to parse, analyze and manipulate Perl code Debian/testing (main/perl): 1.213-1 libperl-minimumversion-perl - module to determine minimum required version of perl required Debian/testing (main/perl): 1.26-1 $ perl -v This is perl, v5.10.1 (*) built for x86_64-linux-gnu-thread-multi (with 50 registered patches, see perl -V for more detail)
From: dean [...] cs.serenevy.net
Some more playing reveals that indeed, this is a problem with matching the regexp after the map - is probably the same as bug 27475. A better test case: map /(\d+)/, qw# foo1 foo2 foo3 # Gives: PPI::Document PPI::Token::Whitespace ' ' PPI::Statement PPI::Token::Word 'map' PPI::Token::Whitespace ' ' PPI::Token::Operator '/' PPI::Structure::List ( ... ) PPI::Statement::Expression PPI::Token::Word 'd' PPI::Token::Operator '+' PPI::Token::Operator '/' PPI::Token::Operator ',' PPI::Token::Whitespace ' ' PPI::Token::QuoteLike::Words 'qw# foo1 foo2 foo3 #' PPI::Token::Whitespace ' ' and not PPI::Document PPI::Token::Whitespace ' ' PPI::Statement PPI::Token::Word 'map' PPI::Token::Whitespace ' ' PPI::Token::Regexp::Match '/(d+)/' PPI::Token::Operator ',' PPI::Token::Whitespace ' ' PPI::Token::QuoteLike::Words 'qw# foo1 foo2 foo3 #' PPI::Token::Whitespace ' '
Fixed in 1.214_01