line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
############################################################################## |
2
|
|
|
|
|
|
|
package Acme::Oil::ed; |
3
|
|
|
|
|
|
|
|
4
|
2
|
|
|
2
|
|
1549
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
48
|
|
5
|
2
|
|
|
2
|
|
8
|
use Carp; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
80
|
|
6
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
44
|
|
7
|
2
|
|
|
2
|
|
9
|
use warnings::register; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
683
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub wipe { |
10
|
58
|
|
|
58
|
0
|
63
|
my $self = shift; |
11
|
58
|
|
50
|
|
|
102
|
my $wipe = shift || 0; |
12
|
58
|
50
|
|
|
|
635
|
return 0 if($self->{level} < 1); |
13
|
58
|
|
|
|
|
126
|
$self->{level} -= $wipe; |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub is_slipped { |
17
|
58
|
|
|
58
|
0
|
64
|
my $self = shift; |
18
|
58
|
|
100
|
|
|
103
|
my $weight = shift || 8; |
19
|
58
|
|
100
|
|
|
106
|
my $wipe = shift || 1; |
20
|
58
|
|
|
|
|
116
|
my $check = $self->wipe($wipe) * $weight; |
21
|
58
|
100
|
|
|
|
314
|
rand(100) < $check ? 1 : 0; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub ignition { |
27
|
2
|
|
|
2
|
0
|
4
|
my $self = shift; |
28
|
2
|
|
|
|
|
3
|
my $ash = 'ASH'; |
29
|
|
|
|
|
|
|
|
30
|
2
|
50
|
|
|
|
353
|
carp "Don't bring the fire close! ...Bom!" |
31
|
|
|
|
|
|
|
if(warnings::enabled('Acme::Oil')); |
32
|
|
|
|
|
|
|
|
33
|
2
|
|
|
|
|
94
|
$self =~ /Acme::Oil::ed::(\w+)/; |
34
|
|
|
|
|
|
|
|
35
|
2
|
100
|
|
|
|
12
|
if($1 eq 'Scalar'){ |
|
|
50
|
|
|
|
|
|
36
|
1
|
|
|
|
|
535
|
require Acme::Oil::Ashed::Scalar; |
37
|
1
|
|
|
|
|
4
|
bless $self, 'Acme::Oil::Ashed::Scalar'; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
elsif($1 eq 'Array'){ |
40
|
1
|
|
|
|
|
759
|
require Acme::Oil::Ashed::Array; |
41
|
1
|
|
|
|
|
5
|
bless $self, 'Acme::Oil::Ashed::Array'; |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
1; |