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") --- warnings.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'warnings.h') diff --git a/warnings.h b/warnings.h index 0677df1446..cf3d363ddc 100644 --- a/warnings.h +++ b/warnings.h @@ -127,6 +127,10 @@ #define WARN_EXPERIMENTAL__UNIPROP_WILDCARDS 71 #define WARN_EXPERIMENTAL__VLB 72 +/* Warnings Categories added in Perl 5.031 */ + +#define WARN_EXPERIMENTAL__ISA 73 + /* =for apidoc Amnh||WARN_ALL @@ -202,6 +206,7 @@ =for apidoc Amnh||WARN_EXPERIMENTAL__PRIVATE_USE =for apidoc Amnh||WARN_EXPERIMENTAL__UNIPROP_WILDCARDS =for apidoc Amnh||WARN_EXPERIMENTAL__VLB +=for apidoc Amnh||WARN_EXPERIMENTAL__ISA =cut */ -- cgit v1.2.1