Login
Since we imported the firstval function, we might as well use the imported symbol.
authorJeffrey Ryan Thalhammer <jeff@imaginative-software.com>
Wed, 21 Dec 2011 22:27:09 +0000 (22:27 +0000)
committerJeffrey Ryan Thalhammer <jeff@imaginative-software.com>
Wed, 21 Dec 2011 22:27:09 +0000 (22:27 +0000)
lib/Perl/Critic/Policy/Variables/ProhibitAugmentedAssignmentInDeclaration.pm

index 15bddbe..c88aaa2 100644 (file)
@@ -3,7 +3,7 @@ package Perl::Critic::Policy::Variables::ProhibitAugmentedAssignmentInDeclaratio
 use 5.006001;
 use strict;
 use warnings;
-use List::MoreUtils qw( firstval );
+use List::MoreUtils qw{ firstval };
 use Readonly;
 
 use Perl::Critic::Utils qw{ :severities :data_conversion };
@@ -35,7 +35,7 @@ sub violates {
     # Other operators in the statement, e.g. the ',' in "my ( $a, $b ) = ();",
     # as assumed to never be immediate children.
 
-    my $found = List::MoreUtils::firstval { $_->isa('PPI::Token::Operator') } $elem->children();
+    my $found = firstval { $_->isa('PPI::Token::Operator') } $elem->children();
     if ( $found ) {
         my $op = $found->content();
         if ( !exists $augmented_assignments{ $op } ) {