| 1 | package Geo::SpatialDB::Entity; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | 2 | $Geo::SpatialDB::Entity::VERSION = '0.000_001'; # TRIAL | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4 | 2 | ▶ | $Geo::SpatialDB::Entity::VERSION = '0.000001';use Moo 2; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5 | 2 | ▶ | use namespace::clean; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 7 | # ABSTRACT: A logical thing found on a map (as opposed to the physical features that form it) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 9 | 2 | has id => ( is => 'rw' ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 10 | 2 | has type => ( is => 'rw' ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 11 | 2 | has tags => ( is => 'rw' ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 13 | 0 | ▶ | sub TO_JSON { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
TO_JSON: not called CC=6 SCAR=37.4
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 14 | 0 | my $self= shift; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 15 | 0 | my %data= %$self; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 16 | 0 | for (keys %data) { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 17 | delete $data{$_} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 18 | if $_ =~ /^[^a-z]/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 19 | or !defined $data{$_} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 20 | 0 | ▶ | or (ref $data{$_} eq 'HASH' && !keys %{ $data{$_} }); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/9
$_ =~ /^[^a-z]/ or not defined $data{$_} or ref $data{$_} eq "HASH" and not keys %{$data{$_};}
$_ =~ /^[^a-z]/ or not defined $data{$_}
ref $data{$_} eq "HASH" and not keys %{$data{$_};}
MC/DC0%0/4
$_ =~ /^[^a-z]/ or not defined $data{$_} or ref $data{$_} eq "HASH" and not keys %{$data{$_};}
$_ =~ /^[^a-z]/
not defined $data{$_}
ref $data{$_} eq "HASH"
not keys %{$data{$_};}
Truth table0%0/5
A or not(B) or C and not(D)
A= $_ =~ /^[^a-z]/B= not defined $data{$_}C= ref $data{$_} eq "HASH"D= not keys %{$data{$_};}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 21 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 22 | 0 | \%data; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 23 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 24 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 25 | 0 | ▶ | sub tag { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
tag: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 26 | 0 | my ($self, $key)= @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 27 | 0 | return $self->{tags}{$key}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 28 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 30 | 2 | 1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 32 | __END__ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||