Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Perl-Critic CPAN distribution.

Report information
The Basics
Id: 46862
Status: resolved
Priority: 0/
Queue: Perl-Critic

People
Owner: Nobody in particular
Requestors: paul.a.liebert [...] hp.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.094001
Fixed in: 1.104



Parenthesis are only optional for builtins when they do not affect the precedence of the expression. Perl::Critic appears to be confused about this in regards to the new (5.010) // operator. For example: length( $var // $default ); behaves differently than this when $var is undefined: length $var // $default; Yet the statement is flagged. Kudos for this otherwise-excellent module.
Subject: pc
Download pc
application/octet-stream 145b

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #46862]
Date: Thu, 11 Jun 2009 16:20:00 -0700
To: bug-Perl-Critic [...] rt.cpan.org
From: Jeffrey Thalhammer <jeff [...] imaginative-software.com>
On Jun 11, 2009, at 3:13 PM, Paul Liebert via RT wrote: Show quoted text
> > Parenthesis are only optional for builtins when they do not affect the > precedence of the expression. Perl::Critic appears to be confused > about > this in regards to the new (5.010) // operator. For example: > > length( $var // $default ); > > behaves differently than this when $var is undefined: > > length $var // $default; > > Yet the statement is flagged.
Thanks for sending this in. I'm not 100% sure about this, but I think PPI doesn't understand the new 5.10 keywords and operators. As soon as it does, I expect this bug will go away. But I'll leave this bug open for now and we'll investigate as soon as possible!
Subject: Re: [rt.cpan.org #46862]
Date: Thu, 11 Jun 2009 16:59:38 -0700
To: bug-Perl-Critic [...] rt.cpan.org
From: Jeffrey Thalhammer <jeff [...] imaginative-software.com>
On Jun 11, 2009, at 4:20 PM, Jeffrey Thalhammer via RT wrote: Show quoted text
> > Thanks for sending this in. I'm not 100% sure about this, but I think > PPI doesn't understand the new 5.10 keywords and operators. As soon > as it does, I expect this bug will go away. But I'll leave this bug > open for now and we'll investigate as soon as possible!
Nope, I was wrong -- this is a Perl-Critic bug. Looks like we've had a TODO test on this for a while. Will work on it when I can.
Subject: Re: [rt.cpan.org #46862]
Date: Thu, 11 Jun 2009 23:34:03 -0500
To: bug-Perl-Critic [...] rt.cpan.org
From: Elliot Shank <perl [...] galumph.com>
Jeffrey Thalhammer via RT wrote: Show quoted text
> Thanks for sending this in. I'm not 100% sure about this, but I think > PPI doesn't understand the new 5.10 keywords and operators. As soon > as it does, I expect this bug will go away. But I'll leave this bug > open for now and we'll investigate as soon as possible!
The current released PPI does understand // and //=. It doesn't, however, understand ~~. (or state, or given, or say, when, or default, ...)
Subject: Re: [rt.cpan.org #46862]
Date: Tue, 25 Aug 2009 22:16:55 -0500
To: bug-Perl-Critic [...] rt.cpan.org
From: Elliot Shank <perl [...] galumph.com>
This bug has been fixed in the 1.104 release. Thank you for the report.