NAME

Data::Object::Role::Catchable

ABSTRACT

Data-Object Catchable Role

SYNOPSIS

use Data::Object 'Class';

with Data::Object::Role::Catchable;

DESCRIPTION

Data::Object::Role::Catchable is a role which provides functionality for catching thrown exceptions.

METHODS

This package implements the following methods.

catch

catch(Object $arg1, ClassName $arg2) : Int

Returns truthy if the objects passed are of the same kind.

catch example
my $catch = $self->catch($object, 'App::Exception');