line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Google::DataAPI::Role::HasContent; |
2
|
1
|
|
|
1
|
|
94489
|
use Any::Moose '::Role'; |
|
1
|
|
|
|
|
34486
|
|
|
1
|
|
|
|
|
8
|
|
3
|
|
|
|
|
|
|
our $VERSION='0.03'; |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
requires 'update'; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
has content => ( |
8
|
|
|
|
|
|
|
isa => 'HashRef', |
9
|
|
|
|
|
|
|
is => 'rw', |
10
|
|
|
|
|
|
|
lazy_build => 1, |
11
|
|
|
|
|
|
|
trigger => sub { $_[0]->update }, |
12
|
|
|
|
|
|
|
); |
13
|
|
|
|
|
|
|
|
14
|
0
|
|
|
0
|
|
0
|
sub _build_content { +{} } |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub param { |
17
|
4
|
|
|
4
|
0
|
992
|
my ($self, $arg) = @_; |
18
|
4
|
100
|
|
|
|
16
|
return $self->content unless $arg; |
19
|
3
|
100
|
|
|
|
8
|
if (ref $arg eq 'HASH') { |
20
|
|
|
|
|
|
|
return $self->content( |
21
|
|
|
|
|
|
|
{ |
22
|
1
|
|
|
|
|
2
|
%{$self->content}, |
|
1
|
|
|
|
|
10
|
|
23
|
|
|
|
|
|
|
%$arg, |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
); |
26
|
|
|
|
|
|
|
} else { |
27
|
2
|
|
|
|
|
11
|
return $self->content->{$arg}; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
1
|
|
|
1
|
|
2577
|
no Any::Moose '::Role'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
7
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
1; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
__END__ |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=pod |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 NAME |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
Net::Google::DataAPI::Role::HasContent - provides 'param' method to Entry |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 SYNOPSIS |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
package MyEntry; |
46
|
|
|
|
|
|
|
use Any::Moose; |
47
|
|
|
|
|
|
|
with qw( |
48
|
|
|
|
|
|
|
Net::Google::DataAPI::Role::Entry |
49
|
|
|
|
|
|
|
Net::Google::DataAPI::Role::HasContent |
50
|
|
|
|
|
|
|
); |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
1; |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 DESCRIPTION |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
Net::Google::DataAPI::Role::HasContent provides 'param' method to Entry. |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 AUTHOR |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
Nobuo Danjou E<lt>danjou@soffritto.orgE<gt> |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 LICENSE |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify |
65
|
|
|
|
|
|
|
it under the same terms as Perl itself. |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=cut |