Subject: | Unable to use provided is_InstanceOf |
Date: | Wed, 1 Jul 2020 09:11:04 +0200 |
To: | bug-Type-Tiny [...] rt.cpan.org |
From: | Kai Wasserbäch <kaw [...] heise.de> |
I'm trying to use is_InstanceOf, but so far have found no way to pass in the
object and the name.
Calling
my $obj = MyObject->new;
if(is_InstanceOf($obj, 'MyObject)) {…}
always yields true and executes the guarded path. Looking at the code it is not
clear to me how I am supposed to hand in the variable to check as well as the
allowed values.
The solution to this bug can be:
1. Document how to call is_InstanceOf and other checks, that allow passing in
the definition of valid values. (And if required: implement a way to do this)
2. Don't export is_* methods for checks that require additional values, if they
can't be passed in.