line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Astro::App::Satpass2::ParseTime::Date::Manip; |
2
|
|
|
|
|
|
|
|
3
|
7
|
|
|
7
|
|
781
|
use strict; |
|
7
|
|
|
|
|
23
|
|
|
7
|
|
|
|
|
304
|
|
4
|
7
|
|
|
7
|
|
55
|
use warnings; |
|
7
|
|
|
|
|
30
|
|
|
7
|
|
|
|
|
235
|
|
5
|
|
|
|
|
|
|
|
6
|
7
|
|
|
7
|
|
47
|
use parent qw{ Astro::App::Satpass2::ParseTime }; |
|
7
|
|
|
|
|
24
|
|
|
7
|
|
|
|
|
62
|
|
7
|
|
|
|
|
|
|
|
8
|
7
|
|
|
|
|
1106
|
use Astro::App::Satpass2::Utils qw{ |
9
|
|
|
|
|
|
|
back_end |
10
|
|
|
|
|
|
|
load_package |
11
|
|
|
|
|
|
|
__date_manip_backend |
12
|
|
|
|
|
|
|
__parse_class_and_args |
13
|
|
|
|
|
|
|
@CARP_NOT |
14
|
7
|
|
|
7
|
|
577
|
}; |
|
7
|
|
|
|
|
33
|
|
15
|
7
|
|
|
7
|
|
63
|
use Astro::Coord::ECI::Utils 0.112 qw{ greg_time_gm }; |
|
7
|
|
|
|
|
250
|
|
|
7
|
|
|
|
|
3276
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
our $VERSION = '0.051'; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub __class_name { |
20
|
0
|
|
|
0
|
|
0
|
return __PACKAGE__; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub attribute_names { |
24
|
0
|
|
|
0
|
1
|
0
|
my ( $self ) = @_; |
25
|
0
|
|
|
|
|
0
|
return ( $self->SUPER::attribute_names(), qw{ back_end station } ); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub delegate { |
29
|
9
|
|
|
9
|
1
|
27
|
my $back_end; |
30
|
9
|
50
|
|
|
|
38
|
defined ( $back_end = __date_manip_backend() ) |
31
|
|
|
|
|
|
|
or return $back_end; |
32
|
0
|
|
|
|
|
|
return __PACKAGE__ . "::v$back_end"; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
{ |
36
|
|
|
|
|
|
|
my $epoch_offset = greg_time_gm( 0, 0, 0, 1, 0, 1970 ); |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub __epoch_offset { |
39
|
0
|
|
|
0
|
|
|
return $epoch_offset; |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub station { |
44
|
0
|
|
|
0
|
1
|
|
my ( $self, @args ) = @_; |
45
|
0
|
0
|
|
|
|
|
if ( @args > 0 ) { |
46
|
0
|
0
|
0
|
|
|
|
not defined $args[0] |
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
|
|
|
|
|
|
|
sub __back_end_default { |
57
|
0
|
|
|
0
|
|
|
my ( undef, $cls ) = @_; |
58
|
0
|
0
|
|
|
|
|
return defined $cls ? $cls : 'Date::Manip::Date'; |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
sub __back_end_validate { |
62
|
0
|
|
|
0
|
|
|
my ( $self, $cls ) = @_; |
63
|
0
|
0
|
|
|
|
|
$cls->isa( 'Date::Manip::Date' ) |
64
|
|
|
|
|
|
|
or $self->wail( "$cls is not a Date::Manip::Date" ); |
65
|
0
|
|
|
|
|
|
return; |
66
|
|
|
|
|
|
|
} |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
1; |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
__END__ |