Re: [perl #24071] Typo in description of binmode
[p5sagit/p5-mst-13.2.git] / pod / perltooc.pod
index 667f9fc..78b6135 100644 (file)
@@ -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};  
     }