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