- or download this
sub isa
{
...
return 0 if $is_builtin{$type};
return $self->SUPER::isa($type);
}
- or download this
sub can_stringify
{
...
return 0 unless blessed $thingy;
return $thingy->can('STRINGIFY');
}
- or download this
if (UNIVERSAL::can($x, 'can') && $x->can('(""'))
{
# Do stuff here
}