Data::Object::Role::Tryable

Data-Object Tryable Role

use Data::Object::Class;

use Data::Object::Role::Tryable;

my $try = $self->try($method);

$try->catch($type, fun ($caught) {
  # caught an exception

  return $something;
});

$try->default(fun ($caught) {
  # catch the uncaught

  return $something;
});

$try->finally(fun ($self, $caught) {
  # always run after try/catch
});

my $result = $try->result;

Data::Object::Library

This role provides a wrapper around the Data::Object::Try class which provides an object-oriented interface for performing complex try/catch operations.

5 POD Errors

The following errors were encountered while parsing the POD:

Around line 8:

Unknown directive: =name

Around line 12:

Unknown directive: =abstract

Around line 16:

Unknown directive: =synopsis

Around line 42:

Unknown directive: =libraries

Around line 46:

Unknown directive: =description