In Metamodel::DefiniteHOW§

See primary documentation in context for method type check.

method type_check($definite_type, $checkee)

Performs a type-check of a definite type against $checkee. This will check if $checkee is of its base type, returning True if they match or False otherwise. This metamethod can get called when a definite type is on the left-hand side of a smartmatch, for instance.

In role Metamodel::TypePretense§

See primary documentation in context for method type check.

method type_check($obj, $checkee)

If $checkee is the same object as $obj or is of any of the types $obj is pretending to be, returns 1, otherwise returns 0.