| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
{ |
|
2
|
|
|
|
|
|
|
package Acme::Marvel::CinematicUniverse::Character; |
|
3
|
1
|
|
|
1
|
|
10
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
30
|
|
|
4
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
38
|
|
|
5
|
1
|
|
|
1
|
|
4
|
no warnings qw( once void ); |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
117
|
|
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $USES_MITE = "Mite::Class"; |
|
8
|
|
|
|
|
|
|
our $MITE_SHIM = "Acme::Marvel::CinematicUniverse::Mite"; |
|
9
|
|
|
|
|
|
|
our $MITE_VERSION = "0.013000"; |
|
10
|
|
|
|
|
|
|
# Mite keywords |
|
11
|
|
|
|
|
|
|
BEGIN { |
|
12
|
1
|
|
|
1
|
|
3
|
my ( $SHIM, $CALLER ) = ( "Acme::Marvel::CinematicUniverse::Mite", "Acme::Marvel::CinematicUniverse::Character" ); |
|
13
|
1
|
|
|
|
|
2
|
( *after, *around, *before, *extends, *has, *param, *signature_for, *with ) = do { |
|
14
|
|
|
|
|
|
|
package Acme::Marvel::CinematicUniverse::Mite; |
|
15
|
1
|
|
|
1
|
|
5
|
no warnings 'redefine'; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
124
|
|
|
16
|
|
|
|
|
|
|
( |
|
17
|
0
|
|
|
0
|
|
0
|
sub { $SHIM->HANDLE_after( $CALLER, "class", @_ ) }, |
|
18
|
0
|
|
|
0
|
|
0
|
sub { $SHIM->HANDLE_around( $CALLER, "class", @_ ) }, |
|
19
|
0
|
|
|
0
|
|
0
|
sub { $SHIM->HANDLE_before( $CALLER, "class", @_ ) }, |
|
20
|
|
|
|
0
|
|
|
sub {}, |
|
21
|
0
|
|
|
0
|
|
0
|
sub { $SHIM->HANDLE_has( $CALLER, has => @_ ) }, |
|
22
|
8
|
|
|
8
|
|
23
|
sub { $SHIM->HANDLE_has( $CALLER, param => @_ ) }, |
|
23
|
0
|
|
|
0
|
|
0
|
sub { $SHIM->HANDLE_signature_for( $CALLER, "class", @_ ) }, |
|
24
|
0
|
|
|
0
|
|
0
|
sub { $SHIM->HANDLE_with( $CALLER, @_ ) }, |
|
25
|
1
|
|
|
|
|
50
|
); |
|
26
|
|
|
|
|
|
|
}; |
|
27
|
|
|
|
|
|
|
}; |
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
# Mite imports |
|
30
|
|
|
|
|
|
|
BEGIN { |
|
31
|
1
|
|
|
1
|
|
2
|
*false = \&Acme::Marvel::CinematicUniverse::Mite::false; |
|
32
|
1
|
|
|
|
|
18
|
*true = \&Acme::Marvel::CinematicUniverse::Mite::true; |
|
33
|
|
|
|
|
|
|
}; |
|
34
|
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
# Gather metadata for constructor and destructor |
|
36
|
|
|
|
|
|
|
sub __META__ { |
|
37
|
1
|
|
|
1
|
|
4
|
no strict 'refs'; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
1092
|
|
|
38
|
1
|
|
33
|
1
|
|
2
|
my $class = shift; $class = ref($class) || $class; |
|
|
1
|
|
|
|
|
6
|
|
|
39
|
1
|
|
|
|
|
18
|
my $linear_isa = mro::get_linear_isa( $class ); |
|
40
|
|
|
|
|
|
|
return { |
|
41
|
|
|
|
|
|
|
BUILD => [ |
|
42
|
1
|
50
|
|
|
|
2
|
map { ( *{$_}{CODE} ) ? ( *{$_}{CODE} ) : () } |
|
|
1
|
|
|
|
|
8
|
|
|
|
0
|
|
|
|
|
0
|
|
|
43
|
1
|
|
|
|
|
3
|
map { "$_\::BUILD" } reverse @$linear_isa |
|
44
|
|
|
|
|
|
|
], |
|
45
|
|
|
|
|
|
|
DEMOLISH => [ |
|
46
|
1
|
50
|
|
|
|
1
|
map { ( *{$_}{CODE} ) ? ( *{$_}{CODE} ) : () } |
|
|
1
|
|
|
|
|
24
|
|
|
|
0
|
|
|
|
|
0
|
|
|
47
|
1
|
|
|
|
|
4
|
map { "$_\::DEMOLISH" } @$linear_isa |
|
|
1
|
|
|
|
|
3
|
|
|
48
|
|
|
|
|
|
|
], |
|
49
|
|
|
|
|
|
|
HAS_BUILDARGS => $class->can('BUILDARGS'), |
|
50
|
|
|
|
|
|
|
HAS_FOREIGNBUILDARGS => $class->can('FOREIGNBUILDARGS'), |
|
51
|
|
|
|
|
|
|
}; |
|
52
|
|
|
|
|
|
|
} |
|
53
|
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
# Standard Moose/Moo-style constructor |
|
56
|
|
|
|
|
|
|
sub new { |
|
57
|
6
|
50
|
|
6
|
0
|
13
|
my $class = ref($_[0]) ? ref(shift) : shift; |
|
58
|
6
|
|
66
|
|
|
17
|
my $meta = ( $Mite::META{$class} ||= $class->__META__ ); |
|
59
|
6
|
|
|
|
|
12
|
my $self = bless {}, $class; |
|
60
|
6
|
50
|
|
|
|
34
|
my $args = $meta->{HAS_BUILDARGS} ? $class->BUILDARGS( @_ ) : { ( @_ == 1 ) ? %{$_[0]} : @_ }; |
|
|
0
|
50
|
|
|
|
0
|
|
|
61
|
6
|
|
|
|
|
8
|
my $no_build = delete $args->{__no_BUILD__}; |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
# Attribute real_name (type: Str) |
|
64
|
|
|
|
|
|
|
# param declaration, file lib/Acme/Marvel/CinematicUniverse/Character.pm, line 19 |
|
65
|
6
|
50
|
|
|
|
13
|
Acme::Marvel::CinematicUniverse::Mite::croak "Missing key in constructor: real_name" unless exists $args->{"real_name"}; |
|
66
|
6
|
50
|
|
|
|
6
|
do { package Acme::Marvel::CinematicUniverse::Mite; defined($args->{"real_name"}) and do { ref(\$args->{"real_name"}) eq 'SCALAR' or ref(\(my $val = $args->{"real_name"})) eq 'SCALAR' } } or Acme::Marvel::CinematicUniverse::Mite::croak "Type check failed in constructor: %s should be %s", "real_name", "Str"; $self->{"real_name"} = $args->{"real_name"}; |
|
|
6
|
50
|
|
|
|
14
|
|
|
|
6
|
50
|
|
|
|
47
|
|
|
|
6
|
|
|
|
|
27
|
|
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
# Attribute hero_name (type: Str) |
|
69
|
|
|
|
|
|
|
# param declaration, file lib/Acme/Marvel/CinematicUniverse/Character.pm, line 20 |
|
70
|
6
|
50
|
|
|
|
10
|
Acme::Marvel::CinematicUniverse::Mite::croak "Missing key in constructor: hero_name" unless exists $args->{"hero_name"}; |
|
71
|
6
|
50
|
|
|
|
7
|
do { package Acme::Marvel::CinematicUniverse::Mite; defined($args->{"hero_name"}) and do { ref(\$args->{"hero_name"}) eq 'SCALAR' or ref(\(my $val = $args->{"hero_name"})) eq 'SCALAR' } } or Acme::Marvel::CinematicUniverse::Mite::croak "Type check failed in constructor: %s should be %s", "hero_name", "Str"; $self->{"hero_name"} = $args->{"hero_name"}; |
|
|
6
|
50
|
|
|
|
11
|
|
|
|
6
|
50
|
|
|
|
16
|
|
|
|
6
|
|
|
|
|
10
|
|
|
72
|
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
# Attribute intelligence (type: PositiveInt) |
|
74
|
|
|
|
|
|
|
# param declaration, file lib/Acme/Marvel/CinematicUniverse/Character.pm, line 21 |
|
75
|
6
|
50
|
|
|
|
14
|
Acme::Marvel::CinematicUniverse::Mite::croak "Missing key in constructor: intelligence" unless exists $args->{"intelligence"}; |
|
76
|
6
|
50
|
33
|
|
|
9
|
(do { package Acme::Marvel::CinematicUniverse::Mite; (do { my $tmp = $args->{"intelligence"}; defined($tmp) and !ref($tmp) and $tmp =~ /\A-?[0-9]+\z/ }) } && do { package Acme::Marvel::CinematicUniverse::Mite; $args->{"intelligence"} > 0 }) or Acme::Marvel::CinematicUniverse::Mite::croak "Type check failed in constructor: %s should be %s", "intelligence", "PositiveInt"; $self->{"intelligence"} = $args->{"intelligence"}; |
|
|
6
|
50
|
33
|
|
|
6
|
|
|
|
6
|
|
|
|
|
7
|
|
|
|
6
|
|
|
|
|
37
|
|
|
|
6
|
|
|
|
|
18
|
|
|
|
6
|
|
|
|
|
8
|
|
|
77
|
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
# Attribute strength (type: PositiveInt) |
|
79
|
|
|
|
|
|
|
# param declaration, file lib/Acme/Marvel/CinematicUniverse/Character.pm, line 22 |
|
80
|
6
|
50
|
|
|
|
11
|
Acme::Marvel::CinematicUniverse::Mite::croak "Missing key in constructor: strength" unless exists $args->{"strength"}; |
|
81
|
6
|
50
|
33
|
|
|
7
|
(do { package Acme::Marvel::CinematicUniverse::Mite; (do { my $tmp = $args->{"strength"}; defined($tmp) and !ref($tmp) and $tmp =~ /\A-?[0-9]+\z/ }) } && do { package Acme::Marvel::CinematicUniverse::Mite; $args->{"strength"} > 0 }) or Acme::Marvel::CinematicUniverse::Mite::croak "Type check failed in constructor: %s should be %s", "strength", "PositiveInt"; $self->{"strength"} = $args->{"strength"}; |
|
|
6
|
50
|
33
|
|
|
7
|
|
|
|
6
|
|
|
|
|
6
|
|
|
|
6
|
|
|
|
|
24
|
|
|
|
6
|
|
|
|
|
13
|
|
|
|
6
|
|
|
|
|
8
|
|
|
82
|
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
# Attribute speed (type: PositiveInt) |
|
84
|
|
|
|
|
|
|
# param declaration, file lib/Acme/Marvel/CinematicUniverse/Character.pm, line 23 |
|
85
|
6
|
50
|
|
|
|
14
|
Acme::Marvel::CinematicUniverse::Mite::croak "Missing key in constructor: speed" unless exists $args->{"speed"}; |
|
86
|
6
|
50
|
33
|
|
|
8
|
(do { package Acme::Marvel::CinematicUniverse::Mite; (do { my $tmp = $args->{"speed"}; defined($tmp) and !ref($tmp) and $tmp =~ /\A-?[0-9]+\z/ }) } && do { package Acme::Marvel::CinematicUniverse::Mite; $args->{"speed"} > 0 }) or Acme::Marvel::CinematicUniverse::Mite::croak "Type check failed in constructor: %s should be %s", "speed", "PositiveInt"; $self->{"speed"} = $args->{"speed"}; |
|
|
6
|
50
|
33
|
|
|
6
|
|
|
|
6
|
|
|
|
|
7
|
|
|
|
6
|
|
|
|
|
24
|
|
|
|
6
|
|
|
|
|
12
|
|
|
|
6
|
|
|
|
|
9
|
|
|
87
|
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
# Attribute durability (type: PositiveInt) |
|
89
|
|
|
|
|
|
|
# param declaration, file lib/Acme/Marvel/CinematicUniverse/Character.pm, line 24 |
|
90
|
6
|
50
|
|
|
|
10
|
Acme::Marvel::CinematicUniverse::Mite::croak "Missing key in constructor: durability" unless exists $args->{"durability"}; |
|
91
|
6
|
50
|
33
|
|
|
14
|
(do { package Acme::Marvel::CinematicUniverse::Mite; (do { my $tmp = $args->{"durability"}; defined($tmp) and !ref($tmp) and $tmp =~ /\A-?[0-9]+\z/ }) } && do { package Acme::Marvel::CinematicUniverse::Mite; $args->{"durability"} > 0 }) or Acme::Marvel::CinematicUniverse::Mite::croak "Type check failed in constructor: %s should be %s", "durability", "PositiveInt"; $self->{"durability"} = $args->{"durability"}; |
|
|
6
|
50
|
33
|
|
|
8
|
|
|
|
6
|
|
|
|
|
55
|
|
|
|
6
|
|
|
|
|
63
|
|
|
|
6
|
|
|
|
|
16
|
|
|
|
6
|
|
|
|
|
16
|
|
|
92
|
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
# Attribute energy_projection (type: PositiveInt) |
|
94
|
|
|
|
|
|
|
# param declaration, file lib/Acme/Marvel/CinematicUniverse/Character.pm, line 25 |
|
95
|
6
|
50
|
|
|
|
14
|
Acme::Marvel::CinematicUniverse::Mite::croak "Missing key in constructor: energy_projection" unless exists $args->{"energy_projection"}; |
|
96
|
6
|
50
|
33
|
|
|
7
|
(do { package Acme::Marvel::CinematicUniverse::Mite; (do { my $tmp = $args->{"energy_projection"}; defined($tmp) and !ref($tmp) and $tmp =~ /\A-?[0-9]+\z/ }) } && do { package Acme::Marvel::CinematicUniverse::Mite; $args->{"energy_projection"} > 0 }) or Acme::Marvel::CinematicUniverse::Mite::croak "Type check failed in constructor: %s should be %s", "energy_projection", "PositiveInt"; $self->{"energy_projection"} = $args->{"energy_projection"}; |
|
|
6
|
50
|
33
|
|
|
7
|
|
|
|
6
|
|
|
|
|
7
|
|
|
|
6
|
|
|
|
|
31
|
|
|
|
6
|
|
|
|
|
15
|
|
|
|
6
|
|
|
|
|
15
|
|
|
97
|
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
# Attribute fighting_ability (type: PositiveInt) |
|
99
|
|
|
|
|
|
|
# param declaration, file lib/Acme/Marvel/CinematicUniverse/Character.pm, line 26 |
|
100
|
6
|
50
|
|
|
|
15
|
Acme::Marvel::CinematicUniverse::Mite::croak "Missing key in constructor: fighting_ability" unless exists $args->{"fighting_ability"}; |
|
101
|
6
|
50
|
33
|
|
|
7
|
(do { package Acme::Marvel::CinematicUniverse::Mite; (do { my $tmp = $args->{"fighting_ability"}; defined($tmp) and !ref($tmp) and $tmp =~ /\A-?[0-9]+\z/ }) } && do { package Acme::Marvel::CinematicUniverse::Mite; $args->{"fighting_ability"} > 0 }) or Acme::Marvel::CinematicUniverse::Mite::croak "Type check failed in constructor: %s should be %s", "fighting_ability", "PositiveInt"; $self->{"fighting_ability"} = $args->{"fighting_ability"}; |
|
|
6
|
50
|
33
|
|
|
7
|
|
|
|
6
|
|
|
|
|
8
|
|
|
|
6
|
|
|
|
|
33
|
|
|
|
6
|
|
|
|
|
26
|
|
|
|
6
|
|
|
|
|
15
|
|
|
102
|
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
# Call BUILD methods |
|
105
|
6
|
50
|
33
|
|
|
11
|
$self->BUILDALL( $args ) if ( ! $no_build and @{ $meta->{BUILD} || [] } ); |
|
|
6
|
50
|
|
|
|
19
|
|
|
106
|
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
# Unrecognized parameters |
|
108
|
6
|
50
|
|
|
|
25
|
my @unknown = grep not( /\A(?:durability|energy_projection|fighting_ability|hero_name|intelligence|real_name|s(?:peed|trength))\z/ ), keys %{$args}; @unknown and Acme::Marvel::CinematicUniverse::Mite::croak( "Unexpected keys in constructor: " . join( q[, ], sort @unknown ) ); |
|
|
6
|
|
|
|
|
45
|
|
|
|
6
|
|
|
|
|
26
|
|
|
109
|
|
|
|
|
|
|
|
|
110
|
6
|
|
|
|
|
26
|
return $self; |
|
111
|
|
|
|
|
|
|
} |
|
112
|
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
# Used by constructor to call BUILD methods |
|
114
|
|
|
|
|
|
|
sub BUILDALL { |
|
115
|
0
|
|
|
0
|
0
|
|
my $class = ref( $_[0] ); |
|
116
|
0
|
|
0
|
|
|
|
my $meta = ( $Mite::META{$class} ||= $class->__META__ ); |
|
117
|
0
|
0
|
|
|
|
|
$_->( @_ ) for @{ $meta->{BUILD} || [] }; |
|
|
0
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
} |
|
119
|
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
# Destructor should call DEMOLISH methods |
|
121
|
|
|
|
|
|
|
sub DESTROY { |
|
122
|
0
|
|
|
0
|
|
|
my $self = shift; |
|
123
|
0
|
|
0
|
|
|
|
my $class = ref( $self ) || $self; |
|
124
|
0
|
|
0
|
|
|
|
my $meta = ( $Mite::META{$class} ||= $class->__META__ ); |
|
125
|
0
|
0
|
|
|
|
|
my $in_global_destruction = defined ${^GLOBAL_PHASE} |
|
126
|
|
|
|
|
|
|
? ${^GLOBAL_PHASE} eq 'DESTRUCT' |
|
127
|
|
|
|
|
|
|
: Devel::GlobalDestruction::in_global_destruction(); |
|
128
|
0
|
0
|
|
|
|
|
for my $demolisher ( @{ $meta->{DEMOLISH} || [] } ) { |
|
|
0
|
|
|
|
|
|
|
|
129
|
0
|
|
|
|
|
|
my $e = do { |
|
130
|
0
|
|
|
|
|
|
local ( $?, $@ ); |
|
131
|
0
|
|
|
|
|
|
eval { $demolisher->( $self, $in_global_destruction ) }; |
|
|
0
|
|
|
|
|
|
|
|
132
|
0
|
|
|
|
|
|
$@; |
|
133
|
|
|
|
|
|
|
}; |
|
134
|
1
|
|
|
1
|
|
7
|
no warnings 'misc'; # avoid (in cleanup) warnings |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
612
|
|
|
135
|
0
|
0
|
|
|
|
|
die $e if $e; # rethrow |
|
136
|
|
|
|
|
|
|
} |
|
137
|
0
|
|
|
|
|
|
return; |
|
138
|
|
|
|
|
|
|
} |
|
139
|
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
my $__XS = !$ENV{PERL_ONLY} && eval { require Class::XSAccessor; Class::XSAccessor->VERSION("1.19") }; |
|
141
|
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
# Accessors for durability |
|
143
|
|
|
|
|
|
|
# param declaration, file lib/Acme/Marvel/CinematicUniverse/Character.pm, line 24 |
|
144
|
|
|
|
|
|
|
if ( $__XS ) { |
|
145
|
|
|
|
|
|
|
Class::XSAccessor->import( |
|
146
|
|
|
|
|
|
|
chained => 1, |
|
147
|
|
|
|
|
|
|
"getters" => { "durability" => "durability" }, |
|
148
|
|
|
|
|
|
|
); |
|
149
|
|
|
|
|
|
|
} |
|
150
|
|
|
|
|
|
|
else { |
|
151
|
|
|
|
|
|
|
*durability = sub { @_ == 1 or Acme::Marvel::CinematicUniverse::Mite::croak( 'Reader "durability" usage: $self->durability()' ); $_[0]{"durability"} }; |
|
152
|
|
|
|
|
|
|
} |
|
153
|
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
# Accessors for energy_projection |
|
155
|
|
|
|
|
|
|
# param declaration, file lib/Acme/Marvel/CinematicUniverse/Character.pm, line 25 |
|
156
|
|
|
|
|
|
|
if ( $__XS ) { |
|
157
|
|
|
|
|
|
|
Class::XSAccessor->import( |
|
158
|
|
|
|
|
|
|
chained => 1, |
|
159
|
|
|
|
|
|
|
"getters" => { "energy_projection" => "energy_projection" }, |
|
160
|
|
|
|
|
|
|
); |
|
161
|
|
|
|
|
|
|
} |
|
162
|
|
|
|
|
|
|
else { |
|
163
|
|
|
|
|
|
|
*energy_projection = sub { @_ == 1 or Acme::Marvel::CinematicUniverse::Mite::croak( 'Reader "energy_projection" usage: $self->energy_projection()' ); $_[0]{"energy_projection"} }; |
|
164
|
|
|
|
|
|
|
} |
|
165
|
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
# Accessors for fighting_ability |
|
167
|
|
|
|
|
|
|
# param declaration, file lib/Acme/Marvel/CinematicUniverse/Character.pm, line 26 |
|
168
|
|
|
|
|
|
|
if ( $__XS ) { |
|
169
|
|
|
|
|
|
|
Class::XSAccessor->import( |
|
170
|
|
|
|
|
|
|
chained => 1, |
|
171
|
|
|
|
|
|
|
"getters" => { "fighting_ability" => "fighting_ability" }, |
|
172
|
|
|
|
|
|
|
); |
|
173
|
|
|
|
|
|
|
} |
|
174
|
|
|
|
|
|
|
else { |
|
175
|
|
|
|
|
|
|
*fighting_ability = sub { @_ == 1 or Acme::Marvel::CinematicUniverse::Mite::croak( 'Reader "fighting_ability" usage: $self->fighting_ability()' ); $_[0]{"fighting_ability"} }; |
|
176
|
|
|
|
|
|
|
} |
|
177
|
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
# Accessors for hero_name |
|
179
|
|
|
|
|
|
|
# param declaration, file lib/Acme/Marvel/CinematicUniverse/Character.pm, line 20 |
|
180
|
|
|
|
|
|
|
if ( $__XS ) { |
|
181
|
|
|
|
|
|
|
Class::XSAccessor->import( |
|
182
|
|
|
|
|
|
|
chained => 1, |
|
183
|
|
|
|
|
|
|
"getters" => { "hero_name" => "hero_name" }, |
|
184
|
|
|
|
|
|
|
); |
|
185
|
|
|
|
|
|
|
} |
|
186
|
|
|
|
|
|
|
else { |
|
187
|
|
|
|
|
|
|
*hero_name = sub { @_ == 1 or Acme::Marvel::CinematicUniverse::Mite::croak( 'Reader "hero_name" usage: $self->hero_name()' ); $_[0]{"hero_name"} }; |
|
188
|
|
|
|
|
|
|
} |
|
189
|
|
|
|
|
|
|
|
|
190
|
|
|
|
|
|
|
# Accessors for intelligence |
|
191
|
|
|
|
|
|
|
# param declaration, file lib/Acme/Marvel/CinematicUniverse/Character.pm, line 21 |
|
192
|
|
|
|
|
|
|
if ( $__XS ) { |
|
193
|
|
|
|
|
|
|
Class::XSAccessor->import( |
|
194
|
|
|
|
|
|
|
chained => 1, |
|
195
|
|
|
|
|
|
|
"getters" => { "intelligence" => "intelligence" }, |
|
196
|
|
|
|
|
|
|
); |
|
197
|
|
|
|
|
|
|
} |
|
198
|
|
|
|
|
|
|
else { |
|
199
|
|
|
|
|
|
|
*intelligence = sub { @_ == 1 or Acme::Marvel::CinematicUniverse::Mite::croak( 'Reader "intelligence" usage: $self->intelligence()' ); $_[0]{"intelligence"} }; |
|
200
|
|
|
|
|
|
|
} |
|
201
|
|
|
|
|
|
|
|
|
202
|
|
|
|
|
|
|
# Accessors for real_name |
|
203
|
|
|
|
|
|
|
# param declaration, file lib/Acme/Marvel/CinematicUniverse/Character.pm, line 19 |
|
204
|
|
|
|
|
|
|
if ( $__XS ) { |
|
205
|
|
|
|
|
|
|
Class::XSAccessor->import( |
|
206
|
|
|
|
|
|
|
chained => 1, |
|
207
|
|
|
|
|
|
|
"getters" => { "real_name" => "real_name" }, |
|
208
|
|
|
|
|
|
|
); |
|
209
|
|
|
|
|
|
|
} |
|
210
|
|
|
|
|
|
|
else { |
|
211
|
|
|
|
|
|
|
*real_name = sub { @_ == 1 or Acme::Marvel::CinematicUniverse::Mite::croak( 'Reader "real_name" usage: $self->real_name()' ); $_[0]{"real_name"} }; |
|
212
|
|
|
|
|
|
|
} |
|
213
|
|
|
|
|
|
|
|
|
214
|
|
|
|
|
|
|
# Accessors for speed |
|
215
|
|
|
|
|
|
|
# param declaration, file lib/Acme/Marvel/CinematicUniverse/Character.pm, line 23 |
|
216
|
|
|
|
|
|
|
if ( $__XS ) { |
|
217
|
|
|
|
|
|
|
Class::XSAccessor->import( |
|
218
|
|
|
|
|
|
|
chained => 1, |
|
219
|
|
|
|
|
|
|
"getters" => { "speed" => "speed" }, |
|
220
|
|
|
|
|
|
|
); |
|
221
|
|
|
|
|
|
|
} |
|
222
|
|
|
|
|
|
|
else { |
|
223
|
|
|
|
|
|
|
*speed = sub { @_ == 1 or Acme::Marvel::CinematicUniverse::Mite::croak( 'Reader "speed" usage: $self->speed()' ); $_[0]{"speed"} }; |
|
224
|
|
|
|
|
|
|
} |
|
225
|
|
|
|
|
|
|
|
|
226
|
|
|
|
|
|
|
# Accessors for strength |
|
227
|
|
|
|
|
|
|
# param declaration, file lib/Acme/Marvel/CinematicUniverse/Character.pm, line 22 |
|
228
|
|
|
|
|
|
|
if ( $__XS ) { |
|
229
|
|
|
|
|
|
|
Class::XSAccessor->import( |
|
230
|
|
|
|
|
|
|
chained => 1, |
|
231
|
|
|
|
|
|
|
"getters" => { "strength" => "strength" }, |
|
232
|
|
|
|
|
|
|
); |
|
233
|
|
|
|
|
|
|
} |
|
234
|
|
|
|
|
|
|
else { |
|
235
|
|
|
|
|
|
|
*strength = sub { @_ == 1 or Acme::Marvel::CinematicUniverse::Mite::croak( 'Reader "strength" usage: $self->strength()' ); $_[0]{"strength"} }; |
|
236
|
|
|
|
|
|
|
} |
|
237
|
|
|
|
|
|
|
|
|
238
|
|
|
|
|
|
|
|
|
239
|
|
|
|
|
|
|
# See UNIVERSAL |
|
240
|
|
|
|
|
|
|
sub DOES { |
|
241
|
0
|
|
|
0
|
0
|
|
my ( $self, $role ) = @_; |
|
242
|
0
|
|
|
|
|
|
our %DOES; |
|
243
|
0
|
0
|
|
|
|
|
return $DOES{$role} if exists $DOES{$role}; |
|
244
|
0
|
0
|
|
|
|
|
return 1 if $role eq __PACKAGE__; |
|
245
|
0
|
0
|
0
|
|
|
|
if ( $INC{'Moose/Util.pm'} and my $meta = Moose::Util::find_meta( ref $self or $self ) ) { |
|
|
|
|
0
|
|
|
|
|
|
246
|
0
|
0
|
0
|
|
|
|
$meta->can( 'does_role' ) and $meta->does_role( $role ) and return 1; |
|
247
|
|
|
|
|
|
|
} |
|
248
|
0
|
|
|
|
|
|
return $self->SUPER::DOES( $role ); |
|
249
|
|
|
|
|
|
|
} |
|
250
|
|
|
|
|
|
|
|
|
251
|
|
|
|
|
|
|
# Alias for Moose/Moo-compatibility |
|
252
|
|
|
|
|
|
|
sub does { |
|
253
|
0
|
|
|
0
|
0
|
|
shift->DOES( @_ ); |
|
254
|
|
|
|
|
|
|
} |
|
255
|
|
|
|
|
|
|
|
|
256
|
|
|
|
|
|
|
1; |
|
257
|
|
|
|
|
|
|
} |