| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
1
|
|
|
1
|
|
14
|
use 5.008; |
|
|
1
|
|
|
|
|
3
|
|
|
2
|
1
|
|
|
1
|
|
5
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
16
|
|
|
3
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
55
|
|
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Acme::Marvel::CinematicUniverse::Character; |
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:TOBYINK'; |
|
8
|
|
|
|
|
|
|
our $VERSION = '0.003'; |
|
9
|
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
357
|
use Acme::Marvel::CinematicUniverse::Mite qw( param -bool ); |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
4
|
|
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
use overload ( |
|
13
|
7
|
|
|
7
|
|
107
|
q[bool] => sub { !!1 }, |
|
14
|
13
|
|
|
13
|
|
191
|
q[""] => sub { shift->real_name }, |
|
15
|
3
|
|
|
3
|
|
11
|
q[0+] => sub { shift->power }, |
|
16
|
1
|
|
|
|
|
19
|
fallback => !!1, |
|
17
|
1
|
|
|
1
|
|
6
|
); |
|
|
1
|
|
|
|
|
2
|
|
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
param real_name => ( isa => 'Str' ); |
|
20
|
|
|
|
|
|
|
param hero_name => ( isa => 'Str' ); |
|
21
|
|
|
|
|
|
|
param intelligence => ( isa => 'PositiveInt' ); |
|
22
|
|
|
|
|
|
|
param strength => ( isa => 'PositiveInt' ); |
|
23
|
|
|
|
|
|
|
param speed => ( isa => 'PositiveInt' ); |
|
24
|
|
|
|
|
|
|
param durability => ( isa => 'PositiveInt' ); |
|
25
|
|
|
|
|
|
|
param energy_projection => ( isa => 'PositiveInt' ); |
|
26
|
|
|
|
|
|
|
param fighting_ability => ( isa => 'PositiveInt' ); |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub power { |
|
29
|
3
|
|
|
3
|
1
|
3
|
my $self = shift; |
|
30
|
3
|
|
|
|
|
4
|
my $sum; |
|
31
|
3
|
|
|
|
|
17
|
$sum += $self->$_ for qw( |
|
32
|
|
|
|
|
|
|
intelligence |
|
33
|
|
|
|
|
|
|
strength |
|
34
|
|
|
|
|
|
|
speed |
|
35
|
|
|
|
|
|
|
durability |
|
36
|
|
|
|
|
|
|
energy_projection |
|
37
|
|
|
|
|
|
|
fighting_ability |
|
38
|
|
|
|
|
|
|
); |
|
39
|
3
|
|
|
|
|
9
|
return $sum; |
|
40
|
|
|
|
|
|
|
} #/ sub power |
|
41
|
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
1; |
|
43
|
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
__END__ |