Login
Substituted string with named constant
authorJeffrey Ryan Thalhammer <jeff@imaginative-software.com>
Mon, 17 Jul 2006 03:34:47 +0000 (03:34 +0000)
committerJeffrey Ryan Thalhammer <jeff@imaginative-software.com>
Mon, 17 Jul 2006 03:34:47 +0000 (03:34 +0000)
lib/Perl/Critic/Policy/ValuesAndExpressions/ProhibitLeadingZeros.pm

index 0d3fda0..30ab588 100644 (file)
@@ -35,7 +35,8 @@ sub violates {
     # PPI misparses floating point numbers that don't have any digits
     # to the left of the decimal poing.  So this is a workaround.
     if ( my $previous = $elem->previous_sibling() ) {
-        return if $previous->isa('PPI::Token::Operator') && $previous eq q{.};
+        return if $previous->isa('PPI::Token::Operator') &&
+            $previous eq $PERIOD;
     }