line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# MooX::Prototype Instance Class |
2
|
|
|
|
|
|
|
package MooX::Prototype::Instance; |
3
|
|
|
|
|
|
|
|
4
|
4
|
|
|
4
|
|
2401
|
use Moo (); |
|
4
|
|
|
|
|
12138
|
|
|
4
|
|
|
|
|
79
|
|
5
|
4
|
|
|
4
|
|
1760
|
use Moo::Role (); |
|
4
|
|
|
|
|
25006
|
|
|
4
|
|
|
|
|
567
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.02'; # VERSION |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
*package = sub { |
10
|
1
|
|
|
1
|
|
1267
|
require MooX::Prototype::Package; |
11
|
1
|
|
33
|
|
|
8
|
return MooX::Prototype::Package->new( |
12
|
|
|
|
|
|
|
name => ref($_[0]) || $_[0] |
13
|
|
|
|
|
|
|
) |
14
|
|
|
|
|
|
|
}; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
my $c = 0; |
17
|
|
|
|
|
|
|
my $m = 0; |
18
|
|
|
|
|
|
|
sub DEMOLISH { |
19
|
13
|
|
|
13
|
0
|
22277
|
my $self = shift; |
20
|
13
|
|
33
|
|
|
43
|
my $class = ref($self) || $self; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
# nasty business all the way down |
23
|
13
|
50
|
33
|
|
|
52
|
$INC{'Class/MOP.pm'} and $c++ if !$c; |
24
|
13
|
50
|
|
|
|
24
|
Class::MOP::remove_metaclass_by_name($class) if $c; |
25
|
13
|
100
|
33
|
|
|
30
|
$INC{'Moo.pm'} and $m++ if !$m; |
26
|
13
|
50
|
|
|
|
84
|
delete $Moo::MAKERS{$class} if $m; |
27
|
|
|
|
|
|
|
|
28
|
13
|
50
|
|
|
|
32
|
unless ($class eq __PACKAGE__) { |
29
|
4
|
|
|
4
|
|
27
|
no strict 'refs'; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
669
|
|
30
|
13
|
|
|
|
|
22
|
my $table = "${class}::"; |
31
|
13
|
|
|
|
|
328
|
my %symbols = %$table; |
32
|
13
|
|
|
|
|
54
|
for my $symbol (keys %symbols) { |
33
|
266
|
50
|
|
|
|
371
|
next if $symbol =~ /\A[^:]+::\z/; |
34
|
266
|
|
|
|
|
386
|
delete $symbols{$symbol}; |
35
|
|
|
|
|
|
|
} |
36
|
13
|
|
|
|
|
63
|
my $file = join('/', split('::', $class)) . 'pm'; |
37
|
13
|
|
|
|
|
36
|
delete $INC{$file}; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
13
|
|
|
|
|
231
|
return 1; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
1; |