Data-Object-Try

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN


 result

      result(Any @args) : Any

    The result method executes the try/catch/default/finally logic and
    returns either 1) the return value from the successfully tried
    operation 2) the return value from the successfully matched catch
    condition if an exception was thrown 3) the return value from the
    default catch condition if an exception was thrown and no catch
    condition matched. When invoked, the try and finally callbacks will
    received an invocant if one was provided to the constructor, the
    default arguments if any were provided to the constructor, and whatever
    arguments were passed directly to this method.

    result example #1

        use routines;
      
        my $try = Data::Object::Try->new;
      

README.md  view on Meta::CPAN


## result

    result(Any @args) : Any

The result method executes the try/catch/default/finally logic and returns
either 1) the return value from the successfully tried operation 2) the return
value from the successfully matched catch condition if an exception was thrown
3) the return value from the default catch condition if an exception was thrown
and no catch condition matched. When invoked, the `try` and `finally`
callbacks will received an `invocant` if one was provided to the constructor,
the default `arguments` if any were provided to the constructor, and whatever
arguments were passed directly to this method.

- result example #1

        use routines;

        my $try = Data::Object::Try->new;

        $try->call(fun (@args) {

lib/Data/Object/Try.pm  view on Meta::CPAN


=head2 result

  result(Any @args) : Any

The result method executes the try/catch/default/finally logic and returns
either 1) the return value from the successfully tried operation 2) the return
value from the successfully matched catch condition if an exception was thrown
3) the return value from the default catch condition if an exception was thrown
and no catch condition matched. When invoked, the C<try> and C<finally>
callbacks will received an C<invocant> if one was provided to the constructor,
the default C<arguments> if any were provided to the constructor, and whatever
arguments were passed directly to this method.

=over 4

=item result example #1

  use routines;

  my $try = Data::Object::Try->new;

t/Data_Object_Try.t  view on Meta::CPAN


=cut

=method result

The result method executes the try/catch/default/finally logic and returns
either 1) the return value from the successfully tried operation 2) the return
value from the successfully matched catch condition if an exception was thrown
3) the return value from the default catch condition if an exception was thrown
and no catch condition matched. When invoked, the C<try> and C<finally>
callbacks will received an C<invocant> if one was provided to the constructor,
the default C<arguments> if any were provided to the constructor, and whatever
arguments were passed directly to this method.

=signature result

result(Any @args) : Any

=example-1 result

  use routines;



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