line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package XML::API::Cache; |
2
|
1
|
|
|
1
|
|
434
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
23
|
|
3
|
1
|
|
|
1
|
|
3
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
22
|
|
4
|
1
|
|
|
1
|
|
2
|
use Carp qw(croak); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
45
|
|
5
|
1
|
|
|
1
|
|
3
|
use overload '""' => \&content; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
4
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.30'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub new { |
10
|
1
|
|
|
1
|
1
|
1
|
my $proto = shift; |
11
|
1
|
|
33
|
|
|
5
|
my $class = ref($proto) || $proto; |
12
|
1
|
|
33
|
|
|
3
|
my $x = shift || croak 'XML::API::Cache->new($x)'; |
13
|
1
|
50
|
|
|
|
5
|
$x->isa('XML::API') || croak 'argument must be XML::API derived object'; |
14
|
|
|
|
|
|
|
|
15
|
1
|
|
|
|
|
4
|
my $self = { |
16
|
|
|
|
|
|
|
content => $x->_fast_string, |
17
|
|
|
|
|
|
|
langs => [ $x->_langs ], |
18
|
|
|
|
|
|
|
}; |
19
|
|
|
|
|
|
|
|
20
|
1
|
|
|
|
|
2
|
bless( $self, $class ); |
21
|
1
|
|
|
|
|
2
|
return $self; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub langs { |
25
|
2
|
|
|
2
|
1
|
3
|
my $self = shift; |
26
|
2
|
|
|
|
|
2
|
return @{ $self->{langs} }; |
|
2
|
|
|
|
|
5
|
|
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub content { |
30
|
2
|
|
|
2
|
1
|
340
|
my $self = shift; |
31
|
2
|
|
|
|
|
5
|
return $self->{content}; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
1; |
35
|
|
|
|
|
|
|
__END__ |