blib/lib/Astro/Nova/LnLatPosn.pm

filter: Statementstmt 48.0% 12 / 25 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 4 / 8 Podpod 100% 4 / 4 totaltotal 48.7% 20 / 41 CC 4 SCAR 21.0
CC
4
Cov
41%
set_all
20.0
members
2.0
as_ascii
2.0
CRAP 8.2
↑ Summary blib/lib/Astro/Nova/DMS.pm »
1 package Astro::Nova::LnLatPosn;
2  
3 3 ▶use 5.008;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 3 ▶use Astro::Nova;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 # basic stuff is in Astro::Nova's XS!
10  
11 0 ▶sub members {
Subroutine members: not called CC=1 SCAR=6.9
Pod documented
12 0 return qw/lng lat/;
13 }
14  
15 0 ▶sub as_ascii {
Subroutine as_ascii: not called CC=1 SCAR=6.9
Pod documented
16 0 my $self = shift;
17 0 my $template = <<'HERE';
18 Longitude: %f
19 Latitude: %f
20 HERE
21 0 return sprintf($template, $self->get_all());
22 }
23  
24 0 ▶sub get_all {
Subroutine get_all: not called CC=1 SCAR=6.9
Pod documented
25 0 my $self = shift;
26 0 return(map $self->$_(), map "get_$_", $self->members());
27 }
28  
29 0 ▶sub set_all {
Subroutine set_all: not called CC=4 SCAR=30.0
Pod documented
30 0 my $self = shift;
31 0 foreach my $member (map "set_$_", $self->members) {
32 0 ▶ last if not @_;
Branch: 1 branch
BranchTrueFalseTotal
unless @_ 0 0 0
33 0 my $value = shift @_;
34 0 ▶ next if not defined $value;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $value 0 0 0
35 0 $self->$member($value);
36 }
37 0 return 1;
38 }
39  
40 3 1;
41 __END__
↑ Summary blib/lib/Astro/Nova/DMS.pm »