POD }
#### Constant assignments #### sub write_constant { my ($fh, $value, $long_name, $short_name, $categories) = @_;
my $export_categories; $export_categories = '(:'. join(" :", @{$categories}) . ')' if ref $categories && @{$categories}; say $fh join q{}, grep { defined } 'our constant ', $long_name, ' is export', $export_categories, " = $value;"; }
my %precision; sub store_precision { my ($name, $precision, $type) = @_;
$precision{$name}->{value} = $precision; $precision{$name}->{type} = $type; }
sub write_precision { my ($fh) = @_;
say $fh "\n", 'my %_precision = ('; for my $name (sort keys %precision) { my ($value, $type) = @{$precision{$name}}{qw/value type/}; say $fh "\t$name \t=> {value => $value, \ttype => '$type'},"; } say $fh ');'; }
To install Astro::Constants, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Astro::Constants
CPAN shell
perl -MCPAN -e shell install Astro::Constants
For more information on module installation, please visit the detailed CPAN module installation guide.