line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Astro::Montenbruck::RiseSet::Constants; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
848
|
use strict; |
|
3
|
|
|
|
|
32
|
|
|
3
|
|
|
|
|
95
|
|
4
|
3
|
|
|
3
|
|
17
|
use warnings; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
165
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our @ISA = qw/Exporter/; |
7
|
|
|
|
|
|
|
our $VERSION = 0.01; |
8
|
|
|
|
|
|
|
|
9
|
3
|
|
|
3
|
|
19
|
use Readonly; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
1272
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
my @events = qw/$EVT_RISE $EVT_SET $EVT_TRANSIT @RS_EVENTS/; |
12
|
|
|
|
|
|
|
my @states = qw/$STATE_CIRCUMPOLAR $STATE_NEVER_RISES/; |
13
|
|
|
|
|
|
|
my @twilight = qw/$TWILIGHT_CIVIL $TWILIGHT_ASTRO $TWILIGHT_NAUTICAL/; |
14
|
|
|
|
|
|
|
my @alts = qw/$H0_SUN $H0_MOO $H0_PLA %H0_TWL/; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
our %EXPORT_TAGS = ( |
17
|
|
|
|
|
|
|
events => \@events, |
18
|
|
|
|
|
|
|
states => \@states, |
19
|
|
|
|
|
|
|
twilight => \@twilight, |
20
|
|
|
|
|
|
|
altitudes => \@alts, |
21
|
|
|
|
|
|
|
all => [ @events, @states, @twilight, @alts ] |
22
|
|
|
|
|
|
|
); |
23
|
|
|
|
|
|
|
our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
Readonly our $EVT_RISE => 'rise'; |
26
|
|
|
|
|
|
|
Readonly our $EVT_SET => 'set'; |
27
|
|
|
|
|
|
|
Readonly our $EVT_TRANSIT => 'transit'; |
28
|
|
|
|
|
|
|
Readonly::Array our @RS_EVENTS => ( $EVT_RISE, $EVT_TRANSIT, $EVT_SET ); |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
Readonly our $STATE_CIRCUMPOLAR => 'circumpolar'; |
31
|
|
|
|
|
|
|
Readonly our $STATE_NEVER_RISES => 'never rises'; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
Readonly our $TWILIGHT_CIVIL => 'civil'; |
34
|
|
|
|
|
|
|
Readonly our $TWILIGHT_ASTRO => 'astronomical'; |
35
|
|
|
|
|
|
|
Readonly our $TWILIGHT_NAUTICAL => 'nautical'; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
Readonly our $H0_SUN => -50 / 60; |
38
|
|
|
|
|
|
|
Readonly our $H0_MOO => 8 / 60; |
39
|
|
|
|
|
|
|
Readonly our $H0_PLA => -34 / 60; |
40
|
|
|
|
|
|
|
Readonly::Hash our %H0_TWL => ( |
41
|
|
|
|
|
|
|
$TWILIGHT_CIVIL => -6, |
42
|
|
|
|
|
|
|
$TWILIGHT_ASTRO => -18, |
43
|
|
|
|
|
|
|
$TWILIGHT_NAUTICAL => -12 |
44
|
|
|
|
|
|
|
); |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
1; |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
__END__ |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=pod |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=encoding UTF-8 |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 NAME |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
Astro::Montenbruck::RiseSet::Constants â rise/set constants |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 SYNOPSIS |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
use Astro::Montenbruck::RiseSet::Constants qw/:all/; |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 VERSION |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
Version 0.01 |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head1 DESCRIPTION |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
Constants used across rise/set modules. |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head1 EXPORT |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head2 CONSTANTS |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head3 EVENTS |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=over |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=item * C<$EVT_RISE> â rise |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=item * C<$EVT_SET> â set |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=item * C<$EVT_TRANSIT> â transit (upper culmination) |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=item * C<@RS_EVENTS> â array containing all the constants above |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=back |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=head3 STATES |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=over |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=item * C<$STATE_CIRCUMPOLAR> â always above the horizon |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=item * C<$STATE_NEVER_RISES> â always below the horizon |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=back |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=head3 TYPES OF TWILIGHT |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=over |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=item * C<$TWILIGHT_CIVIL> â civil |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=item * C<$TWILIGHT_ASTRO> â astronomical |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=item * C<$TWILIGHT_NAUTICAL> â nautical |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=back |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=head3 STANDARD ALTITUDES |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=over |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=item * C<$H0_SUN> â Sun |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
=item * C<$H0_MOO> â Moon |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=item * C<$H0_PLA> â Planets and stars |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
=item * C<%H0_TWL> â For twilight types. Keys are L</TYPES OF TWILIGHT> |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
=back |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
=head2 TAGS |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
=over |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
=item * C<:events> â C<$EVT_RISE>, C<$EVT_SET>, C<$EVT_TRANSIT>, C<@RS_EVENTS> |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
=item * C<:states> â C<$STATE_CIRCUMPOLAR>, C<$STATE_NEVER_RISES> |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
=item * C<:twilight> â C<$TWILIGHT_CIVIL>, C<$TWILIGHT_ASTRO>, C<$TWILIGHT_NAUTICAL> |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
=item * C<:altitudes> â C<$H0_SUN>, C<$H0_MOO>, C<$H0_PLA>, C<%H0_TWL> |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
=item * C<:all> â all of the above |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
=back |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
=head1 AUTHOR |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
Sergey Krushinsky, C<< <krushi at cpan.org> >> |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
Copyright (C) 2010-2019 by Sergey Krushinsky |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify |
149
|
|
|
|
|
|
|
it under the same terms as Perl itself. |
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
=cut |