line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
{ |
2
|
|
|
|
|
|
|
use strict; |
3
|
1
|
|
|
1
|
|
16
|
use warnings; |
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
71
|
|
4
|
1
|
|
|
1
|
|
6
|
no warnings qw( once void ); |
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
91
|
|
5
|
1
|
|
|
1
|
|
14
|
|
|
1
|
|
|
|
|
8
|
|
|
1
|
|
|
|
|
211
|
|
6
|
|
|
|
|
|
|
our $USES_MITE = "Mite::Class"; |
7
|
|
|
|
|
|
|
our $MITE_SHIM = "Mite::Shim"; |
8
|
|
|
|
|
|
|
our $MITE_VERSION = "0.011000"; |
9
|
|
|
|
|
|
|
# Mite keywords |
10
|
|
|
|
|
|
|
BEGIN { |
11
|
|
|
|
|
|
|
my ( $SHIM, $CALLER ) = ( "Mite::Shim", "Thingy1" ); |
12
|
1
|
|
|
1
|
|
5
|
( *after, *around, *before, *extends, *has, *signature_for, *with ) = do { |
13
|
1
|
|
|
|
|
7
|
no warnings 'redefine'; |
14
|
|
|
|
|
|
|
( |
15
|
1
|
|
|
1
|
|
11
|
sub { $SHIM->HANDLE_after( $CALLER, "class", @_ ) }, |
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
340
|
|
16
|
|
|
|
|
|
|
sub { $SHIM->HANDLE_around( $CALLER, "class", @_ ) }, |
17
|
0
|
|
|
|
|
0
|
sub { $SHIM->HANDLE_before( $CALLER, "class", @_ ) }, |
18
|
0
|
|
|
|
|
0
|
sub {}, |
19
|
0
|
|
|
|
|
0
|
sub { $SHIM->HANDLE_has( $CALLER, has => @_ ) }, |
20
|
|
|
|
|
|
|
sub { $SHIM->HANDLE_signature_for( $CALLER, "class", @_ ) }, |
21
|
1
|
|
|
|
|
16
|
sub { $SHIM->HANDLE_with( $CALLER, @_ ) }, |
22
|
0
|
|
|
|
|
0
|
); |
23
|
0
|
|
|
|
|
0
|
}; |
24
|
1
|
|
|
|
|
54
|
|
25
|
|
|
|
|
|
|
# Gather metadata for constructor and destructor |
26
|
|
|
|
|
|
|
no strict 'refs'; |
27
|
|
|
|
|
|
|
my $class = shift; $class = ref($class) || $class; |
28
|
|
|
|
|
|
|
my $linear_isa = mro::get_linear_isa( $class ); |
29
|
|
|
|
|
|
|
return { |
30
|
1
|
|
|
1
|
|
6
|
BUILD => [ |
|
1
|
|
|
|
|
30
|
|
|
1
|
|
|
|
|
1134
|
|
31
|
1
|
|
33
|
1
|
|
3
|
map { ( *{$_}{CODE} ) ? ( *{$_}{CODE} ) : () } |
|
1
|
|
|
|
|
6
|
|
32
|
1
|
|
|
|
|
5
|
map { "$_\::BUILD" } reverse @$linear_isa |
33
|
|
|
|
|
|
|
], |
34
|
|
|
|
|
|
|
DEMOLISH => [ |
35
|
1
|
50
|
|
|
|
1
|
map { ( *{$_}{CODE} ) ? ( *{$_}{CODE} ) : () } |
|
1
|
|
|
|
|
24
|
|
|
0
|
|
|
|
|
0
|
|
36
|
1
|
|
|
|
|
5
|
map { "$_\::DEMOLISH" } @$linear_isa |
37
|
|
|
|
|
|
|
], |
38
|
|
|
|
|
|
|
HAS_BUILDARGS => $class->can('BUILDARGS'), |
39
|
1
|
50
|
|
|
|
1
|
HAS_FOREIGNBUILDARGS => $class->can('FOREIGNBUILDARGS'), |
|
1
|
|
|
|
|
16
|
|
|
0
|
|
|
|
|
0
|
|
40
|
1
|
|
|
|
|
7
|
}; |
|
1
|
|
|
|
|
4
|
|
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
# Standard Moose/Moo-style constructor |
45
|
|
|
|
|
|
|
my $class = ref($_[0]) ? ref(shift) : shift; |
46
|
|
|
|
|
|
|
my $meta = ( $Mite::META{$class} ||= $class->__META__ ); |
47
|
|
|
|
|
|
|
my $self = bless {}, $class; |
48
|
|
|
|
|
|
|
my $args = $meta->{HAS_BUILDARGS} ? $class->BUILDARGS( @_ ) : { ( @_ == 1 ) ? %{$_[0]} : @_ }; |
49
|
|
|
|
|
|
|
my $no_build = delete $args->{__no_BUILD__}; |
50
|
1
|
50
|
|
1
|
|
152
|
|
51
|
1
|
|
33
|
|
|
22
|
# Attribute xyz (type: ArrayRef[Bool]) |
52
|
1
|
|
|
|
|
3
|
# has declaration, file ../../../../tmp/8O2w0hyQfm, line 3 |
53
|
1
|
50
|
|
|
|
4
|
|
|
0
|
50
|
|
|
|
0
|
|
54
|
1
|
|
|
|
|
2
|
|
55
|
|
|
|
|
|
|
# Call BUILD methods |
56
|
|
|
|
|
|
|
$self->BUILDALL( $args ) if ( ! $no_build and @{ $meta->{BUILD} || [] } ); |
57
|
|
|
|
|
|
|
|
58
|
1
|
50
|
0
|
|
|
1
|
# Unrecognized parameters |
|
1
|
0
|
0
|
|
|
5
|
|
|
1
|
50
|
0
|
|
|
2
|
|
|
1
|
0
|
0
|
|
|
1
|
|
|
1
|
0
|
0
|
|
|
2
|
|
|
1
|
0
|
0
|
|
|
1
|
|
|
1
|
0
|
0
|
|
|
5
|
|
|
1
|
0
|
0
|
|
|
1
|
|
|
1
|
50
|
|
|
|
2
|
|
|
1
|
0
|
|
|
|
8
|
|
|
0
|
50
|
|
|
|
0
|
|
|
1
|
50
|
|
|
|
5
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
2
|
|
|
0
|
|
|
|
|
0
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
5
|
|
59
|
|
|
|
|
|
|
my @unknown = grep not( /\Axyz\z/ ), keys %{$args}; @unknown and Mite::Shim::croak( "Unexpected keys in constructor: " . join( q[, ], sort @unknown ) ); |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
return $self; |
62
|
1
|
50
|
33
|
|
|
4
|
} |
|
1
|
50
|
|
|
|
5
|
|
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
# Used by constructor to call BUILD methods |
65
|
1
|
50
|
|
|
|
2
|
my $class = ref( $_[0] ); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
3
|
|
66
|
|
|
|
|
|
|
my $meta = ( $Mite::META{$class} ||= $class->__META__ ); |
67
|
1
|
|
|
|
|
4
|
$_->( @_ ) for @{ $meta->{BUILD} || [] }; |
68
|
|
|
|
|
|
|
} |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
# Destructor should call DEMOLISH methods |
71
|
|
|
|
|
|
|
my $self = shift; |
72
|
0
|
|
|
0
|
|
0
|
my $class = ref( $self ) || $self; |
73
|
0
|
|
0
|
|
|
0
|
my $meta = ( $Mite::META{$class} ||= $class->__META__ ); |
74
|
0
|
0
|
|
|
|
0
|
my $in_global_destruction = defined ${^GLOBAL_PHASE} |
|
0
|
|
|
|
|
0
|
|
75
|
|
|
|
|
|
|
? ${^GLOBAL_PHASE} eq 'DESTRUCT' |
76
|
|
|
|
|
|
|
: Devel::GlobalDestruction::in_global_destruction(); |
77
|
|
|
|
|
|
|
for my $demolisher ( @{ $meta->{DEMOLISH} || [] } ) { |
78
|
|
|
|
|
|
|
my $e = do { |
79
|
1
|
|
|
1
|
|
2694
|
local ( $?, $@ ); |
80
|
1
|
|
33
|
|
|
3
|
eval { $demolisher->( $self, $in_global_destruction ) }; |
81
|
1
|
|
33
|
|
|
4
|
$@; |
82
|
1
|
50
|
|
|
|
5
|
}; |
83
|
|
|
|
|
|
|
no warnings 'misc'; # avoid (in cleanup) warnings |
84
|
|
|
|
|
|
|
die $e if $e; # rethrow |
85
|
1
|
50
|
|
|
|
2
|
} |
|
1
|
|
|
|
|
3
|
|
86
|
0
|
|
|
|
|
0
|
return; |
87
|
0
|
|
|
|
|
0
|
} |
88
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
89
|
0
|
|
|
|
|
0
|
my $__XS = !$ENV{PERL_ONLY} && eval { require Class::XSAccessor; Class::XSAccessor->VERSION("1.19") }; |
90
|
|
|
|
|
|
|
|
91
|
1
|
|
|
1
|
|
7
|
# Accessors for xyz |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
773
|
|
92
|
0
|
0
|
|
|
|
0
|
# has declaration, file ../../../../tmp/8O2w0hyQfm, line 3 |
93
|
|
|
|
|
|
|
if ( $__XS ) { |
94
|
1
|
|
|
|
|
6
|
Class::XSAccessor->import( |
95
|
|
|
|
|
|
|
chained => 1, |
96
|
|
|
|
|
|
|
"getters" => { "xyz" => "xyz" }, |
97
|
|
|
|
|
|
|
); |
98
|
|
|
|
|
|
|
} |
99
|
|
|
|
|
|
|
else { |
100
|
|
|
|
|
|
|
*xyz = sub { @_ == 1 or Mite::Shim::croak( 'Reader "xyz" usage: $self->xyz()' ); $_[0]{"xyz"} }; |
101
|
|
|
|
|
|
|
} |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
# Delegated methods for xyz |
104
|
|
|
|
|
|
|
# has declaration, file ../../../../tmp/8O2w0hyQfm, line 3 |
105
|
|
|
|
|
|
|
*pop_xyz = sub { |
106
|
|
|
|
|
|
|
@_==1 or Mite::Shim::croak("Wrong number of parameters in signature for pop_xyz; usage: "."\$instance->pop_xyz()"); |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
1; |
109
|
|
|
|
|
|
|
my $shv_ref_invocant = do { $_[0]->xyz }; |
110
|
|
|
|
|
|
|
pop(@{$shv_ref_invocant}) |
111
|
|
|
|
|
|
|
}; |
112
|
|
|
|
|
|
|
*push_xyz = sub { |
113
|
|
|
|
|
|
|
|
114
|
0
|
0
|
|
0
|
|
0
|
my $shv_self=shift; |
115
|
|
|
|
|
|
|
my @shv_values = map { my $shv_value = $_; $shv_value = !!$shv_value; } @_; |
116
|
0
|
|
|
|
|
0
|
my $shv_ref_invocant = do { $shv_self->xyz }; |
117
|
0
|
|
|
|
|
0
|
push(@{$shv_ref_invocant}, @shv_values) |
|
0
|
|
|
|
|
0
|
|
118
|
0
|
|
|
|
|
0
|
}; |
|
0
|
|
|
|
|
0
|
|
119
|
|
|
|
|
|
|
*push_false = sub { |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
my $shv_self=shift; |
122
|
2
|
|
|
2
|
|
10
|
CORE::unshift(@_, ("0")); |
123
|
2
|
|
|
|
|
12
|
my @shv_values = map { my $shv_value = $_; $shv_value = !!$shv_value; } @_; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
6
|
|
124
|
2
|
|
|
|
|
3
|
my $shv_ref_invocant = do { $shv_self->xyz }; |
|
2
|
|
|
|
|
6
|
|
125
|
2
|
|
|
|
|
3
|
push(@{$shv_ref_invocant}, @shv_values) |
|
2
|
|
|
|
|
6
|
|
126
|
|
|
|
|
|
|
}; |
127
|
|
|
|
|
|
|
do { |
128
|
|
|
|
|
|
|
my $ENVIRONMENT = { |
129
|
1
|
|
|
1
|
|
3
|
'@curry' => [ |
130
|
1
|
|
|
|
|
3
|
{} |
131
|
1
|
|
|
|
|
1
|
] |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
3
|
|
132
|
1
|
|
|
|
|
9
|
}; |
|
1
|
|
|
|
|
4
|
|
133
|
1
|
|
|
|
|
2
|
; my @curry = @{$ENVIRONMENT->{'@curry'}}; |
|
1
|
|
|
|
|
5
|
|
134
|
|
|
|
|
|
|
*push_true = sub { |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
my $shv_self=shift; |
137
|
|
|
|
|
|
|
CORE::unshift(@_, @curry); |
138
|
|
|
|
|
|
|
my @shv_values = map { my $shv_value = $_; $shv_value = !!$shv_value; } @_; |
139
|
|
|
|
|
|
|
my $shv_ref_invocant = do { $shv_self->xyz }; |
140
|
|
|
|
|
|
|
push(@{$shv_ref_invocant}, @shv_values) |
141
|
|
|
|
|
|
|
}; |
142
|
|
|
|
|
|
|
}; |
143
|
|
|
|
|
|
|
|
144
|
3
|
|
|
3
|
|
10
|
# See UNIVERSAL |
145
|
3
|
|
|
|
|
6
|
my ( $self, $role ) = @_; |
146
|
3
|
|
|
|
|
3
|
our %DOES; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
8
|
|
147
|
3
|
|
|
|
|
3
|
return $DOES{$role} if exists $DOES{$role}; |
|
3
|
|
|
|
|
5
|
|
148
|
3
|
|
|
|
|
4
|
return 1 if $role eq __PACKAGE__; |
|
3
|
|
|
|
|
8
|
|
149
|
|
|
|
|
|
|
if ( $INC{'Moose/Util.pm'} and my $meta = Moose::Util::find_meta( ref $self or $self ) ) { |
150
|
|
|
|
|
|
|
$meta->can( 'does_role' ) and $meta->does_role( $role ) and return 1; |
151
|
|
|
|
|
|
|
} |
152
|
|
|
|
|
|
|
return $self->SUPER::DOES( $role ); |
153
|
|
|
|
|
|
|
} |
154
|
7
|
|
|
7
|
|
13
|
|
155
|
7
|
|
|
|
|
8
|
# Alias for Moose/Moo-compatibility |
156
|
7
|
50
|
|
|
|
13
|
shift->DOES( @_ ); |
157
|
7
|
50
|
|
|
|
20
|
} |
158
|
7
|
50
|
0
|
|
|
15
|
|
|
|
|
33
|
|
|
|
|
159
|
0
|
0
|
0
|
|
|
0
|
1; |