Login
Always put parens on method calls.
authorJeffrey Ryan Thalhammer <jeff@imaginative-software.com>
Mon, 24 Nov 2008 06:27:37 +0000 (06:27 +0000)
committerJeffrey Ryan Thalhammer <jeff@imaginative-software.com>
Mon, 24 Nov 2008 06:27:37 +0000 (06:27 +0000)
lib/Perl/Critic/Document.pm

index 12eefa0..5f3f477 100644 (file)
@@ -168,7 +168,8 @@ sub find_any {
 
 sub filename {
     my ($self) = @_;
-    return $self->{_doc}->can('filename') ? $self->{_doc}->filename : undef;
+    my $doc = $self->{_doc};
+    return $doc->can('filename') ? $doc->filename() : undef;
 }
 
 #-----------------------------------------------------------------------------