line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Google::API::Base; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
72868
|
use strict; |
|
4
|
|
|
|
|
20
|
|
|
4
|
|
|
|
|
115
|
|
4
|
4
|
|
|
4
|
|
22
|
use warnings; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
103
|
|
5
|
4
|
|
|
4
|
|
19
|
use Carp; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
1201
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub new { |
8
|
448
|
|
|
448
|
1
|
756
|
my $class = shift; |
9
|
448
|
|
|
|
|
964
|
bless {}, $class; |
10
|
|
|
|
|
|
|
} |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub set_attr { |
13
|
3159
|
|
|
3159
|
1
|
4622
|
my $self = shift; |
14
|
3159
|
|
|
|
|
4633
|
my ($name, $callback) = @_; |
15
|
3159
|
|
|
|
|
7247
|
$self->{METHODS}{$name} = $callback; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
our $AUTOLOAD; |
19
|
|
|
|
|
|
|
sub AUTOLOAD { |
20
|
450
|
|
|
450
|
|
9279
|
my $self = shift; |
21
|
450
|
|
|
|
|
668
|
my (%param) = @_; |
22
|
450
|
|
|
|
|
625
|
my $func_name = $AUTOLOAD; |
23
|
450
|
|
|
|
|
1325
|
$func_name =~ s/^.*:://; |
24
|
450
|
100
|
|
|
|
44920
|
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
|
|
|
|
|
163
|
Carp::croak("Unknown method: $func_name"); |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |
32
|
|
|
|
|
|
|
__END__ |