summaryrefslogtreecommitdiff
path: root/pod
diff options
context:
space:
mode:
Diffstat (limited to 'pod')
-rw-r--r--pod/perltooc.pod2
1 files changed, 1 insertions, 1 deletions
diff --git a/pod/perltooc.pod b/pod/perltooc.pod
index 667f9fc202..78b6135717 100644
--- a/pod/perltooc.pod
+++ b/pod/perltooc.pod
@@ -842,7 +842,7 @@ ones.
# invoked as class method or object method
sub has_attribute {
my($self, $attr) = @_;
- my $class = ref $self if $self;
+ my $class = ref($self) || $self;
return exists $class->{$attr};
}