From 813e85a03dc214f719dc8248bda36156897b0757 Mon Sep 17 00:00:00 2001 From: "Paul \"LeoNerd\" Evans" Date: Wed, 23 Oct 2019 19:00:38 +0100 Subject: Add the `isa` operator Adds a new infix operator named `isa`, with the semantics that $x isa SomeClass is true if and only if `$x` is a blessed object reference that is either `SomeClass` directly, or includes the class somewhere in its @ISA hierarchy. It is false without warning or error for non-references or non-blessed references. This operator respects `->isa` method overloading, and is intended to replace boilerplate code such as use Scalar::Util 'blessed'; blessed($x) and $x->isa("SomeClass") --- pp_proto.h | 1 + 1 file changed, 1 insertion(+) (limited to 'pp_proto.h') diff --git a/pp_proto.h b/pp_proto.h index 407cbd14a3..580ce937ec 100644 --- a/pp_proto.h +++ b/pp_proto.h @@ -126,6 +126,7 @@ PERL_CALLCONV OP *Perl_pp_index(pTHX); PERL_CALLCONV OP *Perl_pp_int(pTHX); PERL_CALLCONV OP *Perl_pp_introcv(pTHX); PERL_CALLCONV OP *Perl_pp_ioctl(pTHX); +PERL_CALLCONV OP *Perl_pp_isa(pTHX); PERL_CALLCONV OP *Perl_pp_iter(pTHX); PERL_CALLCONV OP *Perl_pp_join(pTHX); PERL_CALLCONV OP *Perl_pp_kvaslice(pTHX); -- cgit v1.2.1