| 1 | package Geo::Formatter::FormatBase::Double; | ||||||||||||||||||||
| 2 | |||||||||||||||||||||
| 3 | 6 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | 6 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | 6 | ▶ | use Carp; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 6 | |||||||||||||||||||||
| 7 | 6 | ▶ | use version; our $VERSION = qv('0.0.1'); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 8 | 6 | ▶ | use base qw(Geo::Formatter::FormatBase); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 9 | |||||||||||||||||||||
| 10 | 12 | ▶ | sub enc_wrap { | ||||||||||||||||||
|
Subroutine
enc_wrap: called CC=2 SCAR=8.9
Pod
documented
| |||||||||||||||||||||
| 11 | 12 | my $pkg = shift; | |||||||||||||||||||
| 12 | |||||||||||||||||||||
| 13 | 13 | ▶ | return $pkg->can("encode") ? sub { | ||||||||||||||||||
|
Subroutine
__ANON__: called CC=6 SCAR=24.3
| |||||||||||||||||||||
| 14 | 13 | ▶ | if (@_ < 2) { | ||||||||||||||||||
|
Branch: 3 branches
| |||||||||||||||||||||
| 15 | 0 | croak "Latitude and Longitude are neccesary"; | |||||||||||||||||||
| 16 | } elsif (@_ > 3) { | ||||||||||||||||||||
| 17 | 0 | croak "Too many arguments"; | |||||||||||||||||||
| 18 | ▶ | } elsif (@_ == 3 && ref($_[2]) ne "HASH") { | |||||||||||||||||||
|
Condition33%1/3
@_ == 3 and ref $_[2] ne "HASH"
MC/DC0%0/2
@_ == 3 and ref $_[2] ne "HASH"
@_ == 3
ref $_[2] ne "HASH"
Truth table33%1/3
A and B
A= @_ == 3B= ref $_[2] ne "HASH"
| |||||||||||||||||||||
| 19 | 0 | croak "Option value must be hash reference"; | |||||||||||||||||||
| 20 | } | ||||||||||||||||||||
| 21 | |||||||||||||||||||||
| 22 | 13 | my @ret = $pkg->encode(@_); | |||||||||||||||||||
| 23 | |||||||||||||||||||||
| 24 | 13 | ▶ | wantarray ? @ret : \@ret; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 25 | 12 | ▶ | } : undef; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 26 | } | ||||||||||||||||||||
| 27 | |||||||||||||||||||||
| 28 | 12 | ▶ | sub dec_wrap { | ||||||||||||||||||
|
Subroutine
dec_wrap: called CC=2 SCAR=8.9
Pod
documented
| |||||||||||||||||||||
| 29 | 12 | my $pkg = shift; | |||||||||||||||||||
| 30 | |||||||||||||||||||||
| 31 | 14 | ▶ | return $pkg->can("decode") ? sub { | ||||||||||||||||||
|
Subroutine
__ANON__: called CC=6 SCAR=24.3
| |||||||||||||||||||||
| 32 | 14 | ▶ | if (@_ < 2) { | ||||||||||||||||||
|
Branch: 3 branches
| |||||||||||||||||||||
| 33 | 0 | croak "Latitude and Longitude are neccesary"; | |||||||||||||||||||
| 34 | } elsif (@_ > 3) { | ||||||||||||||||||||
| 35 | 0 | croak "Too many arguments"; | |||||||||||||||||||
| 36 | ▶ | } elsif (@_ == 3 && ref($_[2]) ne "HASH") { | |||||||||||||||||||
|
Condition33%1/3
@_ == 3 and ref $_[2] ne "HASH"
MC/DC0%0/2
@_ == 3 and ref $_[2] ne "HASH"
@_ == 3
ref $_[2] ne "HASH"
Truth table33%1/3
A and B
A= @_ == 3B= ref $_[2] ne "HASH"
| |||||||||||||||||||||
| 37 | 0 | croak "Option value must be hash reference"; | |||||||||||||||||||
| 38 | } | ||||||||||||||||||||
| 39 | |||||||||||||||||||||
| 40 | 14 | my @ret = $pkg->decode(@_); | |||||||||||||||||||
| 41 | |||||||||||||||||||||
| 42 | 14 | ▶ | wantarray ? @ret : \@ret; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 43 | 12 | ▶ | } : undef; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 44 | } | ||||||||||||||||||||
| 45 | |||||||||||||||||||||
| 46 | 6 | 1; | |||||||||||||||||||
| 47 | |||||||||||||||||||||
| 48 | __END__ | ||||||||||||||||||||