line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
use strict; |
3
|
177
|
|
|
177
|
|
106642
|
use warnings; |
|
177
|
|
|
|
|
333
|
|
|
177
|
|
|
|
|
4471
|
|
4
|
177
|
|
|
177
|
|
766
|
|
|
177
|
|
|
|
|
331
|
|
|
177
|
|
|
|
|
6378
|
|
5
|
|
|
|
|
|
|
our $VERSION = '1.2018'; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
use feature (); |
8
|
177
|
|
|
177
|
|
930
|
use utf8; |
|
177
|
|
|
|
|
352
|
|
|
177
|
|
|
|
|
2956
|
|
9
|
177
|
|
|
177
|
|
84508
|
use IO::File (); |
|
177
|
|
|
|
|
2190
|
|
|
177
|
|
|
|
|
807
|
|
10
|
177
|
|
|
177
|
|
71987
|
use IO::Handle (); |
|
177
|
|
|
|
|
1253633
|
|
|
177
|
|
|
|
|
3818
|
|
11
|
177
|
|
|
177
|
|
1092
|
use Try::Tiny::ByClass; |
|
177
|
|
|
|
|
325
|
|
|
177
|
|
|
|
|
2602
|
|
12
|
177
|
|
|
177
|
|
72861
|
use Catmandu::Error (); |
|
177
|
|
|
|
|
1261862
|
|
|
177
|
|
|
|
|
10284
|
|
13
|
177
|
|
|
177
|
|
68651
|
|
|
177
|
|
|
|
|
1146
|
|
|
177
|
|
|
|
|
24137
|
|
14
|
|
|
|
|
|
|
my $pkg = caller; |
15
|
|
|
|
|
|
|
strict->import; |
16
|
2877
|
|
|
2877
|
|
14630
|
warnings->import; |
17
|
2877
|
|
|
|
|
55398
|
feature->import(qw(:5.10)); |
18
|
2877
|
|
|
|
|
27224
|
utf8->import; |
19
|
2877
|
|
|
|
|
167424
|
Try::Tiny::ByClass->export_to_level(1, $pkg); |
20
|
2877
|
|
|
|
|
15774
|
} |
21
|
2877
|
|
|
|
|
303700
|
|
22
|
|
|
|
|
|
|
1; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=pod |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head1 NAME |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
Catmandu::Sane - Package boilerplate |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head1 SYNOPSIS |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
use Catmandu::Sane; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
# Provides all the 5.10 features. |
36
|
|
|
|
|
|
|
say("what"); |
37
|
|
|
|
|
|
|
given($foo) { |
38
|
|
|
|
|
|
|
when(1) { say "1" } |
39
|
|
|
|
|
|
|
when([2,3]) { say "2 or 3" } |
40
|
|
|
|
|
|
|
when(/abc/) { say "has abc" } |
41
|
|
|
|
|
|
|
default { none of the above } |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
sub next_id{ |
44
|
|
|
|
|
|
|
state $id; |
45
|
|
|
|
|
|
|
++$id; |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
# Provides try/catch[/finally] try/catch_case[/finally] |
49
|
|
|
|
|
|
|
try { |
50
|
|
|
|
|
|
|
} catch {}; |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
# Provides |
53
|
|
|
|
|
|
|
Catmandu::Error->throw("error"); |
54
|
|
|
|
|
|
|
Catmandu::BadVal->throw("eek val"); |
55
|
|
|
|
|
|
|
Catmandu::BadArg->throw("eek arg"); |
56
|
|
|
|
|
|
|
Catmandu::NotImplemented->throw("can't do that!"); |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 DESCRIPTION |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
Package boilerplate equivalent to: |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
use strict; |
63
|
|
|
|
|
|
|
use warnings; |
64
|
|
|
|
|
|
|
use feature qw(:5.10); |
65
|
|
|
|
|
|
|
use utf8; |
66
|
|
|
|
|
|
|
use IO::File (); |
67
|
|
|
|
|
|
|
use IO::Handle (); |
68
|
|
|
|
|
|
|
use Try::Tiny::ByClass; |
69
|
|
|
|
|
|
|
use Catmandu::Error; |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=cut |