sub isa-ok

Documentation for sub isa-ok assembled from the following types:

class Test

From Test

(Test) sub isa-ok

Defined as:

multi sub isa-ok(Mu $varMu $type$desc = "The object is-a '$type.perl()'")

Marks a test as passed if the given object $value is, or inherits from, the given $expected-type. For convenience, types may also be specified as a string. The function accepts an optional description of the test, which defaults to a string that describes the object.

class Womble {}
class GreatUncleBulgaria is Womble {}
my $womble = GreatUncleBulgaria.new;
 
isa-ok $wombleWomble"Great Uncle Bulgaria is a womble";
isa-ok $womble'Womble';     # equivalent