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: 21575
Status: resolved
Priority: 0/
Queue: PPI

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

Bug Information
Severity: Normal
Broken in: 1.116
Fixed in: (no value)



Subject: PPI::Statement::Variable::variables breaks for lists with leading whitespace
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
X-RT-Original-Encoding: utf-8
Content-Type: multipart/mixed; boundary="----------=_1158734464-10294-3"
Content-Length: 0
Content-Type: text/plain; charset="utf8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
Content-Length: 290
Download (untitled) / with headers
text/plain 290b
Variables are not correctly parsed by PPI::Statement::Variable::variables when those variables are contained in a list and the list has whitespace prior to the first variable. e.g.: my ($self, $param) = @_; # ok my ( $self, $param ) = @_; # not ok I have attached a patch to remedy this.
Subject: variable_patch.txt
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----------=_1158734464-10294-2"
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Length: 0
Content-Type: text/plain; charset="utf8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 0
Content-Type: text/plain; charset="utf-8"; name="variable_patch.txt"
Content-Disposition: inline; filename="variable_patch.txt"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: ascii
Content-Length: 452
Download variable_patch.txt
text/plain 452b
--- Variable.pm 2006-09-19 23:32:05.160950100 -0700 +++ Variable.pm 2006-09-19 23:31:55.232668100 -0700 @@ -135,7 +135,7 @@ # If it's a list, return as a list if ( _INSTANCE($schild[1], 'PPI::Structure::List') ) { - my $Expression = $schild[1]->child(0); + my $Expression = $schild[1]->schild(0); $Expression and $Expression->isa('PPI::Statement::Expression') or return ();
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
Message-Id: <rt-3.6.HEAD-10255-1158846671-1781.21575-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 57
Applied test and patch as provided as SVN revision 1048.
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
Message-Id: <rt-3.6.HEAD-10349-1158898283-1872.21575-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 22
Confirmed as resolved.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.