Skip Menu |

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

Report information
The Basics
Id: 28770
Status: open
Priority: 0/
Queue: Perl-Critic-More

People
Owner: Nobody in particular
Requestors: nobody [...] pseudo.borked.net
Cc:
AdminCc:

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



Subject: feature request: prohibit var on lhs of equality check
Date: Thu, 9 Aug 2007 15:11:00 -0600 (MDT)
To: bug-Perl-Critic [...] rt.cpan.org
From: Borked Pseudo Mailed <nobody [...] pseudo.borked.net>
this would prevent possibility of accidentally using '=' if ($foo == 2) # bad if (2 == $foo) # good
Subject: Re: [rt.cpan.org #28770] feature request: prohibit var on lhs of equality check
Date: Wed, 22 Aug 2007 21:24:42 -0700 (PDT)
To: bug-Perl-Critic [...] rt.cpan.org
From: Jeffrey Thalhammer <jeffrey_thalhammer [...] yahoo.com>
Good idea. I'll put this on our TODO list. --- Borked Pseudo Mailed via RT <bug-Perl-Critic@rt.cpan.org> wrote: Show quoted text
> this would prevent possibility of accidentally using > '=' > if ($foo == 2) # bad > if (2 == $foo) # good
Show quoted text
____________________________________________________________________________________ Moody friends. Drama queens. Your life? Nope! - their life, your story. Play Sims Stories at Yahoo! Games. http://sims.yahoo.com/
On Thu Aug 09 17:47:00 2007, nobody@pseudo.borked.net wrote: Show quoted text
> this would prevent possibility of accidentally using '=' > if ($foo == 2) # bad > if (2 == $foo) # good
I've written a Policy to do this, but I'm considering putting it into the P::C::More distribution since I think it will be controversial. I'll probably go one step further and require the constant on the left side of all comparison operators. Thanks for the suggestion! -Jeff
On Sun Jul 27 01:05:26 2008, THALJEF wrote: Show quoted text
> I've written a Policy to do this, but I'm considering putting it into > the P::C::More distribution since I think it will be controversial.
What's the state of this? I see ValuesAndExpressions/RequireConstantOnLeftSideOfEquality.pm in Perl-Critic-More, so should this be resolved?
Subject: Re: [rt.cpan.org #28770] feature request: prohibit var on lhs of equality check
Date: Tue, 20 Jan 2009 13:13:01 -0800
To: bug-Perl-Critic [...] rt.cpan.org
From: Jeffrey Thalhammer <jeff [...] imaginative-software.com>
On Jan 20, 2009, at 12:48 PM, Kyle Hasselbacher via RT wrote: Show quoted text
> What's the state of this? I see > ValuesAndExpressions/RequireConstantOnLeftSideOfEquality.pm in > Perl-Critic-More, so should this be resolved?
We haven't released a new P-C-More distribution in a long time, so that Policy has never gone into the wild. By now, my memory is a fairly rusty on the whole thing. Maybe if you do a quick code review of the Policy, then we can move ahead with releasing it. I'd also like to get Mark's Policy on 80 character lines into the next release of P-C-More. Then I'll mark this as resolved. -Jeff