line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Acme::DoOrDie; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
14116
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
25
|
|
4
|
1
|
|
|
1
|
|
3
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
26
|
|
5
|
|
|
|
|
|
|
use Carp |
6
|
1
|
|
|
1
|
|
3
|
qw(croak); |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
224
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION="0.001"; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub do_or_die ($ ) |
11
|
|
|
|
|
|
|
{ |
12
|
4
|
|
|
4
|
1
|
1084
|
my($name) = @_; |
13
|
4
|
|
|
|
|
4
|
my($want, @result, $result, $syntax); |
14
|
|
|
|
|
|
|
|
15
|
4
|
50
|
33
|
|
|
20
|
if (!defined($name) || $name eq "") { |
16
|
0
|
|
|
|
|
0
|
croak("Missing or undefined argument to require"); |
17
|
|
|
|
|
|
|
} |
18
|
4
|
|
|
|
|
5
|
$want = wantarray(); |
19
|
4
|
100
|
|
|
|
9
|
if ($want) { |
|
|
50
|
|
|
|
|
|
20
|
1
|
|
|
|
|
417
|
@result = do($name); |
21
|
|
|
|
|
|
|
} elsif (defined($want)) { |
22
|
0
|
|
|
|
|
0
|
$result = do($name); |
23
|
|
|
|
|
|
|
} else { |
24
|
3
|
|
|
|
|
447
|
do($name); |
25
|
|
|
|
|
|
|
} |
26
|
4
|
|
|
|
|
141
|
$syntax = $@; |
27
|
4
|
100
|
|
|
|
11
|
if (! exists($INC{$name})) { |
28
|
1
|
|
|
|
|
143
|
croak("Can't locate $name: $! (\@INC contains: ".join(" ",@INC).")"); |
29
|
|
|
|
|
|
|
} |
30
|
3
|
100
|
|
|
|
7
|
if ($syntax ne "") { |
31
|
2
|
|
|
|
|
142
|
croak($syntax); |
32
|
|
|
|
|
|
|
} |
33
|
1
|
50
|
|
|
|
3
|
if ($want) { |
|
|
0
|
|
|
|
|
|
34
|
1
|
|
|
|
|
3
|
@result; |
35
|
|
|
|
|
|
|
} elsif (defined($want)) { |
36
|
0
|
|
|
|
|
|
$result; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
BEGIN { |
41
|
1
|
|
|
1
|
|
2
|
*do = \&do_or_die; |
42
|
1
|
|
|
|
|
2
|
our @EXPORT = qw( |
43
|
|
|
|
|
|
|
do_or_die |
44
|
|
|
|
|
|
|
); |
45
|
1
|
|
|
|
|
14
|
our @EXPORT_OK = qw( |
46
|
|
|
|
|
|
|
do_or_die |
47
|
|
|
|
|
|
|
do |
48
|
|
|
|
|
|
|
); |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
use Exporter |
52
|
1
|
|
|
1
|
|
4
|
qw(import); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
28
|
|
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
1; |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
__END__ |