line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mason::CodeCache; |
2
|
|
|
|
|
|
|
$Mason::CodeCache::VERSION = '2.23'; |
3
|
20
|
|
|
20
|
|
80
|
use Devel::GlobalDestruction; |
|
20
|
|
|
|
|
22
|
|
|
20
|
|
|
|
|
101
|
|
4
|
20
|
|
|
20
|
|
7850
|
use Mason::Moose; |
|
20
|
|
|
|
|
63
|
|
|
20
|
|
|
|
|
103
|
|
5
|
20
|
|
|
20
|
|
44219
|
use Mason::Util; |
|
20
|
|
|
|
|
62
|
|
|
20
|
|
|
|
|
1679
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
has 'datastore' => ( is => 'ro', isa => 'HashRef', default => sub { {} } ); |
8
|
|
|
|
|
|
|
|
9
|
20
|
|
|
20
|
|
9645
|
method get ($key) { |
|
321
|
|
|
321
|
|
509
|
|
|
321
|
|
|
|
|
549
|
|
|
321
|
|
|
|
|
410
|
|
10
|
321
|
|
|
|
|
1467
|
return $self->{datastore}->{$key}; |
11
|
|
|
|
|
|
|
} |
12
|
|
|
|
|
|
|
|
13
|
20
|
|
|
20
|
|
6614
|
method set ($key, $data) { |
|
225
|
|
|
225
|
|
422
|
|
|
225
|
|
|
|
|
484
|
|
|
225
|
|
|
|
|
353
|
|
14
|
225
|
|
|
|
|
1054
|
$self->{datastore}->{$key} = $data; |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
20
|
|
|
20
|
|
6035
|
method remove ($key) { |
|
225
|
|
|
225
|
|
305
|
|
|
225
|
|
|
|
|
327
|
|
|
225
|
|
|
|
|
244
|
|
18
|
225
|
50
|
|
|
|
756
|
if ( my $entry = $self->{datastore}->{$key} ) { |
19
|
225
|
50
|
|
|
|
6339
|
if ( !in_global_destruction() ) { |
20
|
225
|
|
|
|
|
1336
|
my $compc = $entry->{compc}; |
21
|
225
|
|
|
|
|
1551
|
$compc->_unset_class_cmeta(); |
22
|
225
|
|
|
|
|
6669
|
$compc->meta->make_mutable(); |
23
|
225
|
|
|
|
|
66669
|
Mason::Util::delete_package($compc); |
24
|
|
|
|
|
|
|
} |
25
|
225
|
|
|
|
|
47312
|
delete $self->{datastore}->{$key}; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
20
|
|
|
20
|
|
7309
|
method get_keys () { |
|
87
|
|
|
87
|
|
178
|
|
|
87
|
|
|
|
|
137
|
|
30
|
87
|
|
|
|
|
152
|
return keys( %{ $self->{datastore} } ); |
|
87
|
|
|
|
|
506
|
|
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 |