The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

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');