line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mason::CodeCache; |
2
|
|
|
|
|
|
|
$Mason::CodeCache::VERSION = '2.24'; |
3
|
20
|
|
|
20
|
|
82
|
use Devel::GlobalDestruction; |
|
20
|
|
|
|
|
20
|
|
|
20
|
|
|
|
|
116
|
|
4
|
20
|
|
|
20
|
|
7548
|
use Mason::Moose; |
|
20
|
|
|
|
|
55
|
|
|
20
|
|
|
|
|
100
|
|
5
|
20
|
|
|
20
|
|
45345
|
use Mason::Util; |
|
20
|
|
|
|
|
61
|
|
|
20
|
|
|
|
|
1703
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
has 'datastore' => ( is => 'ro', isa => 'HashRef', default => sub { {} } ); |
8
|
|
|
|
|
|
|
|
9
|
20
|
|
|
20
|
|
9228
|
method get ($key) { |
|
321
|
|
|
321
|
|
503
|
|
|
321
|
|
|
|
|
491
|
|
|
321
|
|
|
|
|
380
|
|
10
|
321
|
|
|
|
|
1493
|
return $self->{datastore}->{$key}; |
11
|
|
|
|
|
|
|
} |
12
|
|
|
|
|
|
|
|
13
|
20
|
|
|
20
|
|
6890
|
method set ($key, $data) { |
|
225
|
|
|
225
|
|
427
|
|
|
225
|
|
|
|
|
519
|
|
|
225
|
|
|
|
|
286
|
|
14
|
225
|
|
|
|
|
1143
|
$self->{datastore}->{$key} = $data; |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
20
|
|
|
20
|
|
6305
|
method remove ($key) { |
|
225
|
|
|
225
|
|
351
|
|
|
225
|
|
|
|
|
343
|
|
|
225
|
|
|
|
|
248
|
|
18
|
225
|
50
|
|
|
|
788
|
if ( my $entry = $self->{datastore}->{$key} ) { |
19
|
225
|
50
|
|
|
|
5556
|
if ( !in_global_destruction() ) { |
20
|
225
|
|
|
|
|
1357
|
my $compc = $entry->{compc}; |
21
|
225
|
|
|
|
|
1701
|
$compc->_unset_class_cmeta(); |
22
|
225
|
|
|
|
|
6922
|
$compc->meta->make_mutable(); |
23
|
225
|
|
|
|
|
67903
|
Mason::Util::delete_package($compc); |
24
|
|
|
|
|
|
|
} |
25
|
225
|
|
|
|
|
51027
|
delete $self->{datastore}->{$key}; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
20
|
|
|
20
|
|
7655
|
method get_keys () { |
|
87
|
|
|
87
|
|
186
|
|
|
87
|
|
|
|
|
142
|
|
30
|
87
|
|
|
|
|
149
|
return keys( %{ $self->{datastore} } ); |
|
87
|
|
|
|
|
653
|
|
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable(); |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
1; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
__END__ |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=pod |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 NAME |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
Mason::CodeCache - Result returned from Mason request |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 DESCRIPTION |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
Internal class that manages the cache of components for L<Mason::Interp>. |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 SEE ALSO |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
L<Mason|Mason> |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 AUTHOR |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
Jonathan Swartz <swartz@pobox.com> |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
This software is copyright (c) 2012 by Jonathan Swartz. |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
62
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=cut |