blib/lib/Geo/Coder/Google.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 12 | 12 | 100.0 |
branch | 1 | 2 | 50.0 |
condition | 1 | 2 | 50.0 |
subroutine | 3 | 3 | 100.0 |
pod | 0 | 1 | 0.0 |
total | 17 | 20 | 85.0 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package Geo::Coder::Google; | ||||||
2 | |||||||
3 | 3 | 3 | 212524 | use strict; | |||
3 | 28 | ||||||
3 | 89 | ||||||
4 | 3 | 3 | 15 | use warnings; | |||
3 | 6 | ||||||
3 | 437 | ||||||
5 | our $VERSION = '0.20'; | ||||||
6 | |||||||
7 | sub new { | ||||||
8 | 7 | 7 | 0 | 4560 | my ($self, %param) = @_; | ||
9 | 7 | 50 | 28 | my $apiver = delete $param{apiver} || 3; | |||
10 | 7 | 19 | my $class = 'Geo::Coder::Google::V' . $apiver; | ||||
11 | |||||||
12 | 7 | 50 | 399 | eval "require $class"; die $@ if $@; | |||
7 | 37 | ||||||
13 | 7 | 37 | $class->new(%param); | ||||
14 | } | ||||||
15 | |||||||
16 | 1; | ||||||
17 | __END__ |