blib/lib/Astro/App/Satpass2/ParseTime/Date/Manip.pm

filter: Statementstmt 55.2% 21 / 38 Branchbran 10.0% 1 / 10 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 50.0% 6 / 12 Podpod 100% 3 / 3 totaltotal 45.5% 31 / 68 CC 7 SCAR 17.9
CC
7
Cov
43%
station
17.0
__back_end_default
6.0
__back_end_validate
6.0
CRAP 6.0
« blib/lib/Astro/App/Satpass2/Format.pm ↑ Summary blib/lib/Astro/App/Satpass2/FormatTime/DateTime/Cldr.pm »
1 package Astro::App::Satpass2::ParseTime::Date::Manip;
2  
3 7 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 7 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 7 ▶use parent qw{ Astro::App::Satpass2::ParseTime };
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 7 ▶use Astro::App::Satpass2::Utils qw{
Subroutine BEGIN: called CC=1 SCAR=0.0
9 back_end
10 load_package
11 __date_manip_backend
12 __parse_class_and_args
13 @CARP_NOT
14 7 };
15 7 ▶use Astro::Coord::ECI::Utils 0.112 qw{ greg_time_gm };
Subroutine BEGIN: called CC=1 SCAR=0.0
16  
17 7 our $VERSION = '0.059';
18  
19 0 ▶sub __class_name {
Subroutine __class_name: not called CC=1 SCAR=6.9
20 0 return __PACKAGE__;
21 }
22  
23 0 ▶sub attribute_names {
Subroutine attribute_names: not called CC=1 SCAR=6.9
Pod documented
24 0 my ( $self ) = @_;
25 0 return ( $self->SUPER::attribute_names(), qw{ back_end station } );
26 }
27  
28 9 ▶sub delegate {
Subroutine delegate: called CC=2 SCAR=8.1
Pod documented
29 9 my $back_end;
30 9 ▶ defined ( $back_end = __date_manip_backend() )
Branch: 1 branch
BranchTrueFalseTotal
defined($back_end = __date_manip_backend()) or return $back_end 0 9 9
31 or return $back_end;
32 0 return __PACKAGE__ . "::v$back_end";
33 }
34  
35 {
36 7 my $epoch_offset = greg_time_gm( 0, 0, 0, 1, 0, 1970 );
37  
38 0 ▶ sub __epoch_offset {
Subroutine __epoch_offset: not called CC=1 SCAR=6.9
39 0 return $epoch_offset;
40 }
41 }
42  
43 7 ▶sub station {
Subroutine station: not called CC=4 SCAR=28.3
Pod documented
44 0 my ( $self, @args ) = @_;
45 0 ▶ if ( @args > 0 ) {
Branch: 1 branch
BranchTrueFalseTotal
if (@args > 0) 0 0 0
46 0 ▶ not defined $args[0]
Branch: 1 branch
BranchTrueFalseTotal
not defined $args[0] or $args[0]->isa("Astro::Coord::ECI") or $self->wail("Station must be an Astro::Coord::ECI") 0 0 0
Condition0%0/3
not defined $args[0] or $args[0]->isa("Astro::Coord::ECI")
l!l&&r!l&&!r
000
MC/DC0%0/2
not defined $args[0] or $args[0]->isa("Astro::Coord::ECI")
not defined $args[0] $args[0]->isa("Astro::Coord::ECI")
Truth table0%0/3
not(A) or B
A= not defined $args[0]B= $args[0]->isa("Astro::Coord::ECI")
ABresult
1X1
011
000
47 or $args[0]->isa( 'Astro::Coord::ECI' )
48 or $self->wail( 'Station must be an Astro::Coord::ECI' );
49 0 $self->{station} = $args[0];
50 0 $self->__set_back_end_location( $args[0] );
51 0 return $self;
52 }
53 0 return $self->{station};
54 }
55  
56 0 ▶sub __back_end_default {
Subroutine __back_end_default: not called CC=2 SCAR=17.9
57 0 my ( undef, $cls ) = @_;
58 0 ▶ return defined $cls ? $cls : 'Date::Manip::Date';
Branch: 1 branch
BranchTrueFalseTotal
defined $cls ? : 0 0 0
59 }
60  
61 0 ▶sub __back_end_validate {
Subroutine __back_end_validate: not called CC=2 SCAR=17.9
62 0 my ( $self, $cls ) = @_;
63 0 ▶ $cls->isa( 'Date::Manip::Date' )
Branch: 1 branch
BranchTrueFalseTotal
$cls->isa("Date::Manip::Date") or $self->wail("$cls is not a Date::Manip::Date") 0 0 0
64 or $self->wail( "$cls is not a Date::Manip::Date" );
65 0 return;
66 }
67  
68 7 1;
69  
70 __END__
« blib/lib/Astro/App/Satpass2/Format.pm ↑ Summary blib/lib/Astro/App/Satpass2/FormatTime/DateTime/Cldr.pm »