develooper Front page | perl.perl5.porters | Postings from February 2021

Re: Blessed objects are `isa` their reftype

Thread Previous | Thread Next
From:
Paul "LeoNerd" Evans
Date:
February 17, 2021 10:16
Subject:
Re: Blessed objects are `isa` their reftype
Message ID:
20210217101638.742a573c@shy.leonerd.org.uk
On Tue, 16 Feb 2021 17:07:39 -0800
David Christensen <dpchrist@holgerdanske.com> wrote:

> I agree that binary 'isa' in the case numbered 3 above does not
> appear to match this documentation:
> 
>      https://perldoc.perl.org/5.32.0/perlop#Class-Instance-Operator
> 
> because $aobj is not an object instance of the class 'ARRAY' or a 
> subclass derived from class 'ARRAY'.
> 
> 
> However, binary 'isa' does appear to be consistent with
> UNIVERSAL::isa() invoked as a function,

Indeed, as I wrote in the documentation added at
https://github.com/Perl/perl5/tree/leonerd/doc-isa:

  This is done in order to preserve the equivalence to the
  C<UNIVERSAL::isa> method

-- 
Paul "LeoNerd" Evans

leonerd@leonerd.org.uk      |  https://metacpan.org/author/PEVANS
http://www.leonerd.org.uk/  |  https://www.tindie.com/stores/leonerd/

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About