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: 26462
Status: resolved
Priority: 0/
Queue: Perl-Critic

People
Owner: Nobody in particular
Requestors: sabol [...] alderaan.gsfc.nasa.gov
Cc:
AdminCc:

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



Subject: ControlStructures::ProhibitCascadingIfElse pod typo
There's a typo in the example code. I also include one whitespace change for aesthetic while I'm at it. Patch included inline as well as uploaded as an attachment. --- ProhibitCascadingIfElse.pm.orig 2007-04-12 04:31:15.000000000 -0400 +++ ProhibitCascadingIfElse.pm 2007-04-17 18:48:44.704099000 -0400 @@ -83,7 +83,7 @@ if ($condition1) { #ok $foo = 1; } - elseif ($condition2) { #ok + elsif ($condition2) { #ok $foo = 2; } elsif ($condition3) { #ok @@ -92,7 +92,7 @@ elsif ($condition4) { #too many! $foo = 4; } - else{ #ok + else { #ok $foo = $default; }
Subject: perl-critic-pod.patch
--- ProhibitCascadingIfElse.pm.orig 2007-04-12 04:31:15.000000000 -0400 +++ ProhibitCascadingIfElse.pm 2007-04-17 18:48:44.704099000 -0400 @@ -83,7 +83,7 @@ if ($condition1) { #ok $foo = 1; } - elseif ($condition2) { #ok + elsif ($condition2) { #ok $foo = 2; } elsif ($condition3) { #ok @@ -92,7 +92,7 @@ elsif ($condition4) { #too many! $foo = 4; } - else{ #ok + else { #ok $foo = $default; }
Fixed and released as Perl-Critic-1.053. Thanks for reporting this.