line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Try; |
2
|
|
|
|
|
|
|
BEGIN { |
3
|
6
|
|
|
6
|
|
198268
|
$Try::AUTHORITY = 'cpan:DOY'; |
4
|
|
|
|
|
|
|
} |
5
|
|
|
|
|
|
|
{ |
6
|
|
|
|
|
|
|
$Try::VERSION = '0.03'; |
7
|
|
|
|
|
|
|
} |
8
|
6
|
|
|
6
|
|
57
|
use strict; |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
214
|
|
9
|
6
|
|
|
6
|
|
97
|
use warnings; |
|
6
|
|
|
|
|
12
|
|
|
6
|
|
|
|
|
213
|
|
10
|
|
|
|
|
|
|
# ABSTRACT: nicer exception handling syntax |
11
|
|
|
|
|
|
|
|
12
|
6
|
|
|
6
|
|
9564
|
use Devel::CallParser; |
|
6
|
|
|
|
|
47436
|
|
|
6
|
|
|
|
|
592
|
|
13
|
6
|
|
|
6
|
|
60
|
use XSLoader; |
|
6
|
|
|
|
|
13
|
|
|
6
|
|
|
|
|
486
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
XSLoader::load( |
16
|
|
|
|
|
|
|
__PACKAGE__, |
17
|
|
|
|
|
|
|
exists $Try::{VERSION} ? ${ $Try::{VERSION} } : (), |
18
|
|
|
|
|
|
|
); |
19
|
|
|
|
|
|
|
|
20
|
6
|
|
|
6
|
|
41
|
use Exporter 'import'; |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
987
|
|
21
|
|
|
|
|
|
|
our @EXPORT = our @EXPORT_OK = ('try'); |
22
|
|
|
|
|
|
|
|
23
|
6
|
|
|
6
|
|
7064
|
use Try::Tiny (); |
|
6
|
|
|
|
|
25789
|
|
|
6
|
|
|
|
|
894
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub try { |
28
|
29
|
|
|
29
|
1
|
36437
|
my ($try, $catch, $finally) = @_; |
29
|
29
|
100
|
|
|
|
157
|
&Try::Tiny::try( |
|
|
100
|
|
|
|
|
|
30
|
|
|
|
|
|
|
$try, |
31
|
|
|
|
|
|
|
($catch ? (&Try::Tiny::catch($catch)) : ()), |
32
|
|
|
|
|
|
|
($finally ? (&Try::Tiny::finally($finally)) : ()), |
33
|
|
|
|
|
|
|
); |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
1; |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
__END__ |