From 44f60cee044153a2855dd5a92ce624f1747d1e6c Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sat, 18 Aug 2012 18:03:05 -0500 Subject: more documentation --- lib/Try.pm | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/lib/Try.pm b/lib/Try.pm index bb7d563..c23a82c 100644 --- a/lib/Try.pm +++ b/lib/Try.pm @@ -56,6 +56,21 @@ syntax of the C statement. This is almost certainly not an issue. =cut +=head1 EXPORTS + +=head2 try + +C takes a block to run, and catch exceptions from. The block can +optionally be followed by C and another block and C and another +block. The C block is run when the C block throws an exception, and +the exception thrown will be in both C<$_> and C<@_>. The C block will +be run after the C and C blocks regardless of what happens, even if +the C block rethrows the exception. The exception thrown will be in +C<@_> but B C<$_> (this may change in the future, since I'm pretty sure +the reasoning for this is no longer useful in 5.14). + +=cut + sub try { my ($try, $catch, $finally) = @_; &Try::Tiny::try( -- cgit v1.2.3