line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package My::Module::Test; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
2702
|
use 5.006002; |
|
1
|
|
|
|
|
4
|
|
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
4
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
18
|
|
6
|
1
|
|
|
1
|
|
3
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
49
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = '0.132'; |
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
5
|
use Exporter qw{ import }; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
47
|
|
11
|
|
|
|
|
|
|
|
12
|
1
|
|
|
1
|
|
5
|
use Astro::Coord::ECI::TLE qw{ :constants }; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
204
|
|
13
|
1
|
|
|
1
|
|
6
|
use Astro::Coord::ECI::Utils qw{ rad2deg }; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
66
|
|
14
|
1
|
|
|
1
|
|
5
|
use Test::More 0.88; |
|
1
|
|
|
|
|
16
|
|
|
1
|
|
|
|
|
8
|
|
15
|
|
|
|
|
|
|
|
16
|
1
|
|
|
1
|
|
365
|
use constant CODE_REF => ref sub {}; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
316
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
our @EXPORT_OK = qw{ |
19
|
|
|
|
|
|
|
magnitude |
20
|
|
|
|
|
|
|
}; |
21
|
|
|
|
|
|
|
our %EXPORT_TAGS = ( |
22
|
|
|
|
|
|
|
all => \@EXPORT_OK, |
23
|
|
|
|
|
|
|
); |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub magnitude { |
26
|
4
|
|
|
4
|
1
|
4894
|
my ( $tle, @arg ) = @_; |
27
|
4
|
|
|
|
|
15
|
my ( $time, $want, $name ) = splice @arg, -3; |
28
|
4
|
|
|
|
|
7
|
my $got; |
29
|
|
|
|
|
|
|
eval { |
30
|
4
|
|
|
|
|
22
|
$got = $tle->universal( $time )->magnitude( @arg ); |
31
|
4
|
50
|
|
|
|
71
|
defined $got |
32
|
|
|
|
|
|
|
and $got = sprintf '%.1f', $got; |
33
|
4
|
|
|
|
|
15
|
1; |
34
|
4
|
50
|
|
|
|
6
|
} or do { |
35
|
0
|
|
|
|
|
0
|
@_ = "$name failed: $@"; |
36
|
0
|
|
|
|
|
0
|
goto &fail; |
37
|
|
|
|
|
|
|
}; |
38
|
4
|
50
|
|
|
|
13
|
if ( defined $want ) { |
39
|
4
|
|
|
|
|
15
|
$want = sprintf '%.1f', $want; |
40
|
4
|
|
|
|
|
16
|
@_ = ( $got, 'eq', $want, $name ); |
41
|
4
|
|
|
|
|
33
|
goto &cmp_ok; |
42
|
|
|
|
|
|
|
} else { |
43
|
0
|
|
|
|
|
|
@_ = ( ! defined $got, $name ); |
44
|
0
|
|
|
|
|
|
goto &ok; |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
1; |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
__END__ |