Astro-Coord-ECI-VSOP87D
view release on metacpan or search on metacpan
lib/Astro/Coord/ECI/VSOP87D/Sun.pm view on Meta::CPAN
use Astro::Coord::ECI::VSOP87D qw{ :sun };
use Carp;
our $VERSION = '0.007';
sub new {
my ( $class, %arg ) = @_;
$class->__default( \%arg );
return $class->SUPER::new( %arg );
}
{
my $get = sub {
my ( $self, $name ) = @_;
return $self->__get_attr()->{$name};
};
my %accessor = (
model_cutoff => $get,
nutation_cutoff => $get,
);
sub attribute {
my ( $self, $name ) = @_;
exists $accessor{$name}
and return __PACKAGE__;
return $self->SUPER::attribute( $name );
}
sub get {
my ( $self, @arg ) = @_;
my @rslt;
foreach my $name ( @arg ) {
if ( my $code = $accessor{$name} ) {
push @rslt, $code->( $self, $name );
} else {
push @rslt, $self->SUPER::get( $name );
}
wantarray
or return $rslt[0];
}
return @rslt;
}
}
sub __model {
return ( ( 0 ) x 6 );
lib/Astro/Coord/ECI/VSOP87D/Sun.pm view on Meta::CPAN
nutation_cutoff => \&__mutate_nutation_cutoff,
);
sub set {
my ( $self, @arg ) = @_;
while ( @arg ) {
my ( $name, $value ) = splice @arg, 0, 2;
if ( my $code = $mutator{$name} ) {
$code->( $self, $name, $value );
} else {
$self->SUPER::set( $name, $value );
}
}
return $self;
}
}
1;
__END__
lib/Astro/Coord/ECI/VSOP87D/_Inferior.pm view on Meta::CPAN
};
use Astro::Coord::ECI::Utils qw{ PI find_first_true mod2pi };
use Astro::Coord::ECI::VSOP87D qw{ :mixin };
use Carp;
our $VERSION = '0.007';
sub new {
my ( $class, %arg ) = @_;
$class->__default( \%arg );
return $class->SUPER::new( %arg );
}
sub __almanac_event_type_iterator {
my ( $self, $station ) = @_;
my $inx = 0;
my $horizon = $station->__get_almanac_horizon();
my @events = (
lib/Astro/Coord/ECI/VSOP87D/_Inferior.pm view on Meta::CPAN
my %accessor = (
elongation_in_longitude => $get,
model_cutoff => $get,
nutation_cutoff => $get,
);
sub attribute {
my ( $self, $name ) = @_;
exists $accessor{$name}
and return __PACKAGE__;
return $self->SUPER::attribute( $name );
}
sub get {
my ( $self, @arg ) = @_;
my @rslt;
foreach my $name ( @arg ) {
if ( my $code = $accessor{$name} ) {
push @rslt, $code->( $self, $name );
} else {
push @rslt, $self->SUPER::get( $name );
}
wantarray
or return $rslt[0];
}
return @rslt;
}
}
# NOTE that the %opt arguments are UNSUPPORTED and can be changed or
# removed without notice. Caveat codor.
lib/Astro/Coord/ECI/VSOP87D/_Inferior.pm view on Meta::CPAN
nutation_cutoff => \&__mutate_nutation_cutoff,
);
sub set {
my ( $self, @arg ) = @_;
while ( @arg ) {
my ( $name, $value ) = splice @arg, 0, 2;
if ( my $code = $mutator{$name} ) {
$code->( $self, $name, $value );
} else {
$self->SUPER::set( $name, $value );
}
}
return $self;
}
}
1;
__END__
lib/Astro/Coord/ECI/VSOP87D/_Superior.pm view on Meta::CPAN
};
use Astro::Coord::ECI::Utils qw{ PI PIOVER2 find_first_true mod2pi };
use Astro::Coord::ECI::VSOP87D qw{ :mixin };
use Carp;
our $VERSION = '0.007';
sub new {
my ( $class, %arg ) = @_;
$class->__default( \%arg );
return $class->SUPER::new( %arg );
}
sub __almanac_event_type_iterator {
my ( $self, $station ) = @_;
my $inx = 0;
my $horizon = $station->__get_almanac_horizon();
my @events = (
lib/Astro/Coord/ECI/VSOP87D/_Superior.pm view on Meta::CPAN
my %accessor = (
model_cutoff => $get,
nutation_cutoff => $get,
);
sub attribute {
my ( $self, $name ) = @_;
exists $accessor{$name}
and return __PACKAGE__;
return $self->SUPER::attribute( $name );
}
sub get {
my ( $self, @arg ) = @_;
my @rslt;
foreach my $name ( @arg ) {
if ( my $code = $accessor{$name} ) {
push @rslt, $code->( $self, $name );
} else {
push @rslt, $self->SUPER::get( $name );
}
wantarray
or return $rslt[0];
}
return @rslt;
}
}
# NOTE that the %opt arguments are UNSUPPORTED and can be changed or
# removed without notice. Caveat coder.
lib/Astro/Coord/ECI/VSOP87D/_Superior.pm view on Meta::CPAN
nutation_cutoff => \&__mutate_nutation_cutoff,
);
sub set {
my ( $self, @arg ) = @_;
while ( @arg ) {
my ( $name, $value ) = splice @arg, 0, 2;
if ( my $code = $mutator{$name} ) {
$code->( $self, $name, $value );
} else {
$self->SUPER::set( $name, $value );
}
}
return $self;
}
}
1;
__END__
( run in 0.374 second using v1.01-cache-2.11-cpan-a9ef4e587e4 )