line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Datahub::Factory::Sane; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
10
|
use Datahub::Factory::Sane; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
37
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '1.76'; |
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
5
|
use feature (); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
12
|
|
8
|
1
|
|
|
1
|
|
4
|
use utf8; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
5
|
|
9
|
1
|
|
|
1
|
|
412
|
use IO::File (); |
|
1
|
|
|
|
|
7123
|
|
|
1
|
|
|
|
|
22
|
|
10
|
1
|
|
|
1
|
|
6
|
use IO::Handle (); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
14
|
|
11
|
1
|
|
|
1
|
|
369
|
use Try::Tiny::ByClass; |
|
1
|
|
|
|
|
6312
|
|
|
1
|
|
|
|
|
52
|
|
12
|
1
|
|
|
1
|
|
337
|
use Datahub::Factory::Error (); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
84
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub import { |
15
|
5
|
|
|
5
|
|
16
|
my $pkg = caller; |
16
|
5
|
|
|
|
|
26
|
strict->import; |
17
|
5
|
|
|
|
|
41
|
warnings->import; |
18
|
5
|
|
|
|
|
320
|
feature->import(qw(:5.10)); |
19
|
5
|
|
|
|
|
33
|
utf8->import; |
20
|
5
|
|
|
|
|
540
|
Try::Tiny::ByClass->export_to_level(1, $pkg); |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
1; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
__END__ |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=pod |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 NAME |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
Datahub::Factory::Sane - Package boilerplate |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 SYNOPSIS |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
use Datahub::Factory::Sane; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
# Provides all the 5.10 features. |
38
|
|
|
|
|
|
|
say("what"); |
39
|
|
|
|
|
|
|
given($foo) { |
40
|
|
|
|
|
|
|
when(1) { say "1" } |
41
|
|
|
|
|
|
|
when([2,3]) { say "2 or 3" } |
42
|
|
|
|
|
|
|
when(/abc/) { say "has abc" } |
43
|
|
|
|
|
|
|
default { none of the above } |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
sub next_id{ |
46
|
|
|
|
|
|
|
state $id; |
47
|
|
|
|
|
|
|
++$id; |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
# Provides try/catch[/finally] try/catch_case[/finally] |
51
|
|
|
|
|
|
|
try { |
52
|
|
|
|
|
|
|
} catch {}; |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 DESCRIPTION |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
Package boilerplate equivalent to: |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
use strict; |
59
|
|
|
|
|
|
|
use warnings; |
60
|
|
|
|
|
|
|
use feature qw(:5.10); |
61
|
|
|
|
|
|
|
use utf8; |
62
|
|
|
|
|
|
|
use IO::File (); |
63
|
|
|
|
|
|
|
use IO::Handle (); |
64
|
|
|
|
|
|
|
use Try::Tiny::ByClass; |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=cut |