Data-Object-Role-Tryable

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

METHODS

    This package implements the following methods:

 try

      try(CodeRef | Str $method) : InstanceOf['Data::Object::Try']

    The try method takes a method name or coderef and returns a
    Data::Object::Try object with the current object passed as the invocant
    which means that try and finally callbacks will receive that as the
    first argument.

    try example #1

        # given: synopsis
      
        my $tryer = $example->try(fun(@args) {
          [@args]
        });
      

README.md  view on Meta::CPAN

# METHODS

This package implements the following methods:

## try

    try(CodeRef | Str $method) : InstanceOf['Data::Object::Try']

The try method takes a method name or coderef and returns a
[Data::Object::Try](https://metacpan.org/pod/Data::Object::Try) object with the current object passed as the invocant
which means that `try` and `finally` callbacks will receive that as the first
argument.

- try example #1

        # given: synopsis

        my $tryer = $example->try(fun(@args) {
          [@args]
        });

lib/Data/Object/Role/Tryable.pm  view on Meta::CPAN

This package implements the following methods:

=cut

=head2 try

  try(CodeRef | Str $method) : InstanceOf['Data::Object::Try']

The try method takes a method name or coderef and returns a
L<Data::Object::Try> object with the current object passed as the invocant
which means that C<try> and C<finally> callbacks will receive that as the first
argument.

=over 4

=item try example #1

  # given: synopsis

  my $tryer = $example->try(fun(@args) {
    [@args]

t/Data_Object_Role_Tryable.t  view on Meta::CPAN

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

=cut

=method try

The try method takes a method name or coderef and returns a
L<Data::Object::Try> object with the current object passed as the invocant
which means that C<try> and C<finally> callbacks will receive that as the first
argument.

=signature try

try(CodeRef | Str $method) : InstanceOf['Data::Object::Try']

=example-1 try

  # given: synopsis



( run in 0.432 second using v1.01-cache-2.11-cpan-9b1e4054eb1 )