line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Google::API::Base; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
26787
|
use strict; |
|
3
|
|
|
|
|
13
|
|
|
3
|
|
|
|
|
88
|
|
4
|
3
|
|
|
3
|
|
13
|
use warnings; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
57
|
|
5
|
3
|
|
|
3
|
|
14
|
use Carp; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
772
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub new { |
8
|
6
|
|
|
6
|
1
|
23
|
my $class = shift; |
9
|
6
|
|
|
|
|
22
|
bless {}, $class; |
10
|
|
|
|
|
|
|
} |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub set_attr { |
13
|
17
|
|
|
17
|
1
|
38
|
my $self = shift; |
14
|
17
|
|
|
|
|
24
|
my ($name, $callback) = @_; |
15
|
17
|
|
|
|
|
71
|
$self->{METHODS}{$name} = $callback; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
our $AUTOLOAD; |
19
|
|
|
|
|
|
|
sub AUTOLOAD { |
20
|
2
|
|
|
2
|
|
508
|
my $self = shift; |
21
|
2
|
|
|
|
|
5
|
my (%param) = @_; |
22
|
2
|
|
|
|
|
4
|
my $func_name = $AUTOLOAD; |
23
|
2
|
|
|
|
|
11
|
$func_name =~ s/^.*:://; |
24
|
2
|
50
|
|
|
|
7
|
return if $func_name eq 'DESTROY'; |
25
|
2
|
100
|
|
|
|
7
|
if (exists $self->{METHODS}{$func_name}) { |
26
|
1
|
|
|
|
|
5
|
return $self->{METHODS}{$func_name}->(%param); |
27
|
|
|
|
|
|
|
} |
28
|
1
|
|
|
|
|
196
|
Carp::croak("Unknown method: $func_name"); |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |
32
|
|
|
|
|
|
|
__END__ |