view release on metacpan or search on metacpan
lib/Assert/Refute/T/Numeric.pm view on Meta::CPAN
};
=cut
use Carp;
use Scalar::Util qw(looks_like_number);
use parent qw(Exporter);
use Assert::Refute::Build;
=head2 is_between $x, $lower, $upper, [$message]
lib/Assert/Refute/T/Numeric.pm view on Meta::CPAN
build_refute is_between => sub {
my ($x, $min, $max) = @_;
croak "Non-numeric boundaries: ".to_scalar($min, 0).",".to_scalar($max, 0)
unless looks_like_number $min and looks_like_number $max;
return "Not a number: ".to_scalar($x, 0)
unless looks_like_number $x;
return $min <= $x && $x <= $max ? '' : "$x is not in [$min, $max]";
}, args => 3, export => 1;
=head2 within_delta $x, $expected, $delta, [$message]
lib/Assert/Refute/T/Numeric.pm view on Meta::CPAN
build_refute within_delta => sub {
my ($x, $exp, $delta) = @_;
croak "Non-numeric boundaries: ".to_scalar($exp, 0)."+-".to_scalar($delta, 0)
unless looks_like_number $exp and looks_like_number $delta;
return "Not a number: ".to_scalar($x, 0)
unless looks_like_number $x;
return abs($x - $exp) <= $delta ? '' : "$x is not in [$exp +- $delta]";
}, args => 3, export => 1;
=head2 within_relative $x, $expected, $delta, [$message]
lib/Assert/Refute/T/Numeric.pm view on Meta::CPAN
build_refute within_relative => sub {
my ($x, $exp, $delta) = @_;
croak "Non-numeric boundaries: ".to_scalar($exp, 0)."+-".to_scalar($delta, 0)
unless looks_like_number $exp and looks_like_number $delta;
return "Not a number: ".to_scalar($x, 0)
unless looks_like_number $x;
return abs($x - $exp) <= abs($exp * $delta)
? ''
: "$x differs from $exp by more than ".$exp*$delta;
}, args => 3, export => 1;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Astro/App/Satpass2.pm view on Meta::CPAN
}
sub _set_almanac_horizon {
my ( $self, $name, $value ) = @_;
my $parsed = $self->__parse_angle( { accept => 1 }, $value );
my $internal = looks_like_number( $parsed ) ? deg2rad( $parsed ) :
$parsed;
my $eci = Astro::Coord::ECI->new();
$eci->set( $name => $internal ); # To validate.
$self->{"_$name"} = $internal;
return( $self->{$name} = $parsed );
lib/Astro/App/Satpass2.pm view on Meta::CPAN
if (my $key = $twilight_abbr{lc $val}) {
$self->{$name} = $key;
$self->{_twilight} = $twilight_def{$key};
} else {
my $angle = $self->__parse_angle( { accept => 1 }, $val );
looks_like_number( $angle )
or $self->wail( 'Twilight must be number or known keyword' );
$self->{$name} = $val;
$self->{_twilight} = deg2rad ($angle);
}
return $val;
lib/Astro/App/Satpass2.pm view on Meta::CPAN
$sgn and '-' eq $sgn and return -$angle;
return $angle;
}
$opt->{accept}
or looks_like_number( $angle )
or $self->wail( "Invalid angle '$angle'" );
return $angle;
}
lib/Astro/App/Satpass2.pm view on Meta::CPAN
my $units = lc (
$string =~ s/ \s* ( [[:alpha:]]+ ) \z //smx ? $1 : $dfunits );
$units{$units}
or $self->wail( "Units of '$units' are unknown" );
$string ne '' or $string = $dfdist;
looks_like_number ($string)
or $self->wail( "'$string' is not a number" );
return $string * $units{$units};
}
}
lib/Astro/App/Satpass2.pm view on Meta::CPAN
=over
=item L<Astro::SIMBAD::Client|Astro::SIMBAD::Client>
This module looks up the positions of astronomical bodies in the SIMBAD
database at L<https://simbad.cds.unistra.fr/simbad/>. This is only used
by the C<lookup> subcommand of the L<sky()|/sky> method.
=item L<Astro::SpaceTrack|Astro::SpaceTrack>
lib/Astro/App/Satpass2.pm view on Meta::CPAN
=head2 geocode
$output = $satpass2->geocode('1600 Pennsylvania Ave, Washington DC');
satpass2> geocode '1600 Pennsylvania Ave, Washington DC'
This interactive method looks up its argument using the currently-set
L<geocoder|/geocoder>. It will fail if no geocoder is set.
If exactly one match is found, the location, latitude, and longitude
attributes are set accordingly.
lib/Astro/App/Satpass2.pm view on Meta::CPAN
objects, in the format of the 'sky add' commands needed to re-create
them. If no subcommand at all is given, 'list' is assumed.
=head3 lookup
This subcommand takes as its argument a name, looks that name up in the
University of Strasbourg's SIMBAD database, and adds the object to the
background. An error occurs if the object can not be found. This
subcommand will fail if the
L<Astro::SIMBAD::Client|Astro::SIMBAD::Client> module can not be loaded.
Nothing is returned.
view all matches for this distribution
view release on metacpan or search on metacpan
}
=item B<_verify_year>
Check the year looks okay, return false if it does not, the year
if it looks okay.
=cut
sub _verify_year {
my $self = shift;
return (($year =~ /^\d{4}$/) ? $year : () );
}
=item B<_verify_journalcode>
Check that the journal code looks okay. Returns the code if okay,
false otherwise.
Does not check to see if the journal code can be translated.
Trailing dots are removed from the input string.
1967rgd1.conf Rarefied Gas Dynamics, Volume 1
1963rgd2.conf Rarefied Gas Dynamics, Volume 2
1965rgd2.conf Rarefied Gas Dynamics, Volume 2
1967rgd2.conf Rarefied Gas Dynamics, Volume 2
rmus.nasa Reanalysis of Mariner 9 UV Spectrometer Data for Ozone, Cloud, and Dust Abundances, and Their Interaction Over Climate Timescales
2000racc.conf Recent Advances and Cross-Century Outlooks in Physics, Interplay between Theory and Experiment
1977agra.rept Recent Advances in Gamma-Ray Astronomy
1982raoa.conf Recent Advances in Observational Astronomy
1985rapm.book Recent Advances in Planetary Meteorology
1982rdea.conf Recent Developments in Electron-Atom and Electron-Molecule Collision
1962rdgr.book Recent Developments in General Relativity
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Astro/Catalog/IO/ASSM.pm view on Meta::CPAN
L<Astro::Catalog>, L<Astro::Catalog::IO::Simple>
=head1 FORMAT
The ASSM format is defined as follows: Any line that looks like
RAdeg Decdeg filter1mag filter2mag filter3mag sp. type source
=head1 COPYRIGHT
view all matches for this distribution
view release on metacpan or search on metacpan
script/benchmarks/NOTES view on Meta::CPAN
using ```
perl -d:NYTProf profile_long.pl
nytprofhtml --open
```
to examine the time that a program spends starting up, it looks like there's no
speed up to be found in importing a smaller tag. It spends about 4ms whether
it's looking up ```:long``` or ```:planetary```.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Astro/Coord/ECI/TLE/Iridium.pm view on Meta::CPAN
# is not quite lit. This happened with Iridium 32 (OID 24945) on
# Feb 03 2007 at 07:45:19 PM. So we check for illumination one
# last time.
# TODO: this calculation should be performed not on the position
# of the Sun, but on the actual point on the Sun which is
# reflected to the observer. It looks now like it needs to be done
# in _flare_calculate_angle_list().
($self->universal ($time)->azel ($illum->universal ($time)))[1] >=
$self->dip () or next;
lib/Astro/Coord/ECI/TLE/Iridium.pm view on Meta::CPAN
my ( $self, $time ) = @_;
defined( my $zone = $self->get( 'zone' ) )
or return localtime $time;
looks_like_number( $zone )
and return gmtime( $zone * 3600 + $time );
if ( $date_time_available ) {
my $dt = DateTime->from_epoch(
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Astro/Coord/ECI/VSOP87D.pm view on Meta::CPAN
use utf8;
use Astro::Coord::ECI::Utils qw{
AU PI SECSPERDAY TWOPI
asin deg2rad jcent2000 julianday
load_module looks_like_number mod2pi
rad2deg rad2dms rad2hms tan
};
use Exporter qw{ import };
use Carp;
use POSIX qw{ floor };
lib/Astro/Coord/ECI/VSOP87D.pm view on Meta::CPAN
or $name = $self->get( 'model_cutoff' );
my $attr = $self->__get_attr();
if ( @arg ) {
if ( defined( my $val = $arg[0] ) ) {
unless ( ref $val ) {
looks_like_number( $val )
and $val !~ m/ \A Inf (?: inity )? | NaN \z /smx
or croak 'Scalar model cutoff definition must be a number';
my $num = $val;
$val = sub {
my ( @model ) = @_;
lib/Astro/Coord/ECI/VSOP87D.pm view on Meta::CPAN
sub __mutate_nutation_cutoff {
my ( $self, undef, $val ) = @_;
defined $val
or croak 'Nutation cutoff must be defined';
looks_like_number( $val )
and $val >= 0
or croak 'Nutation cutoff must be a non-negative number';
$self->__get_attr()->{nutation_cutoff} = $val;
return $self;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Astro/Coords/Angle.pm view on Meta::CPAN
use strict;
use warnings;
use warnings::register;
use Carp;
use Scalar::Util qw/ looks_like_number /;
use Astro::PAL;
# Overloading
use overload
'""' => "stringify",
lib/Astro/Coords/Angle.pm view on Meta::CPAN
# Now if we have a space, colon or alphabetic character
# then we have a real string and assume sexagesimal.
# Use pre-defined character classes
my $units;
# if it does not look like a number choose sexagesimal
if (!looks_like_number($input)) {
$units = "sexagesimal";
} elsif ($input > Astro::PAL::D2PI) {
$units = "degrees";
} else {
$units = "radians";
view all matches for this distribution
view release on metacpan or search on metacpan
Method/FINDOFF.pm view on Meta::CPAN
=item verbose - If this argument is set to true (1), then this method will
print progress statements. Defaults to false.
This method uses the Starlink FINDOFF task, which is part of
CCDPACK. In order for this method to work it must be able to find
FINDOFF. It first looks in the directory pointed to by the CCDPACK_DIR
environment variable, then it looks in the Starlink binary files
directory pointed to by the Starlink::Config module, with C</ccdpack>
appended. If either of these fail, then this method will croak. See
the C<Starlink::Config> module for information on overriding the base
Starlink directory for non-standard installations.
view all matches for this distribution
view release on metacpan or search on metacpan
CheckStatus.pm view on Meta::CPAN
sub STORE
{
require Scalar::Util;
if ( defined $_[1] && ! ref $_[1] && Scalar::Util::looks_like_number( $_[1] ) )
{
# set to non-zero value
if ( $_[0]->{value} = $_[1] )
{
require Astro::FITS::CFITSIO;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Astro/FITS/HdrTrans/CGS4New.pm view on Meta::CPAN
=item B<to_ROTATION>
This determines the angle, in decimal degrees, of the rotation of the
sky component of the WCS. It uses the standard transformation matrix
PCi_j as defined in the FITS WCS Standard. In the absence of a PCi_j
matrix, it looks for the CROTA2 keyword.
For CGS4 the PCi_j matrix is obtained from i=[2,3] and j=[2,3].
=cut
view all matches for this distribution
view release on metacpan or search on metacpan
listkids|||
list|||
load_module_nocontext|||vn
load_module|5.006000||pv
localize|||
looks_like_bool|||
looks_like_number|||
lop|||
mPUSHi|5.009002||p
mPUSHn|5.009002||p
mPUSHp|5.009002||p
mPUSHs|5.011000||p
view all matches for this distribution
view release on metacpan or search on metacpan
listkids|||
list|||
load_module_nocontext|||vn
load_module|5.006000||pv
localize|||
looks_like_bool|||
looks_like_number|||
lop|||
mPUSHi|5.009002||p
mPUSHn|5.009002||p
mPUSHp|5.009002||p
mPUSHs|5.011000||p
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Astro/NED/Query.pm view on Meta::CPAN
# map between Multiple values and form inputs.
# HTML::Table creates a separate input for each value in a checkbox
# or option. this routine creates a hash matching the values to the
# input to make it easier to set the inputs. In some cases a single
# logical list of options is split into several so the GUI looks
# cleaner. this will merge them.
sub _setupMultiple
{
my ( $self, $type, $alias, @names ) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
libnova-0.15.0/INSTALL view on Meta::CPAN
================
If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Operation Controls
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Astro/PAL.pm view on Meta::CPAN
=item palObs
palObs is special in that it returns an empty list if the return
status is bad. Additionally, palObs is called with a single
argument and the behaviour depends on whether the argument looks
like an integer or a string.
($ident, $name, $w, $p, $h) = palObs( 27 );
($ident, $name, $w, $p, $h) = palObs( "JCMT" );
view all matches for this distribution
view release on metacpan or search on metacpan
inc/My/Module/Test.pm view on Meta::CPAN
C<call()>, C<count()>, C<deref()>, C<deref_curr()>, or C<find()> is
compared to the expected value, and the test succeeds or fails based on
the result of the comparison.
If the expected value is a C<Regexp> object, the comparison is done with
the C<Test::More> C<like()> subroutine. If it looks like a number, the
comparison is done with C<cmp_ok> for numeric equality. Otherwise, the
comparison is done with C<is>.
=head1 SUPPORT
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Devel/CheckLib.pm view on Meta::CPAN
It works by trying to compile some code - which defaults to this:
int main(void) { return 0; }
and linking it to the specified libraries. If something pops out the end
which looks executable, it gets executed, and if main() returns 0 we know
that it worked. That tiny program is
built once for each library that you specify, and (without linking) once
for each header file.
If you want to check for the presence of particular functions in a
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Astro/SkyX/AutomatedImageLinkSettings.pm view on Meta::CPAN
use Astro::SkyX;
blah blah blah
=head1 DESCRIPTION
Stub documentation for SkyX, created by h2xs. It looks like the
author of the extension was negligent enough to leave the stub
unedited.
Blah blah blah.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Astro/SpaceTrack.pm view on Meta::CPAN
The argument specifies a special data set.
=back
The default is C<'CATNR'> if the argument is numeric, C<'INTDES'> if the
argument looks like an international designator, or C<'GROUP'>
otherwise.
=back
A list of valid C<GROUP> names and brief descriptions can be obtained by
lib/Astro/SpaceTrack.pm view on Meta::CPAN
The argument specifies a special data set.
=back
The default is C<'CATNR'> if the argument is numeric, C<'INTDES'> if the
argument looks like an international designator, or C<'FILE'> otherwise.
=item rms
This Boolean option specifies that RMS data be returned rather than TLE
data, if available. This option is valid only on known catalogs that
lib/Astro/SpaceTrack.pm view on Meta::CPAN
return $resp;
}
# FIXME in the last couple days this has started returning nothing.
# It looks like -exclude debris excludes everything, as does
# -exclude rocket.
# Get Iridium status from Space Track. Unlike the other sources,
# Space Track does not know whether satellites are in service or
# not, but it does know about all of them, and whether or not they
lib/Astro/SpaceTrack.pm view on Meta::CPAN
$context->{data} = $content;
}
return;
}
# _check_cookie_generic looks for our session cookie. If it is found, it
# returns true if it thinks the cookie is valid, and false otherwise. If
# it is not found, it returns false.
sub _record_cookie_generic {
my ( $self, $version ) = @_;
lib/Astro/SpaceTrack.pm view on Meta::CPAN
# _dump_cookie is intended to be called from inside the
# HTTP::Cookie->scan method. The first argument is prefix text
# for the dump, and the subsequent arguments are the arguments
# passed to the scan method.
# It dumps the contents of the cookie to STDERR via a warn ().
# A typical session cookie looks like this:
# version => 0
# key => 'spacetrack_session'
# val => whatever
# path => '/'
# domain => 'www.space-track.org'
lib/Astro/SpaceTrack.pm view on Meta::CPAN
}
}
# $opt = _parse_retrieve_dates ($opt);
# This subroutine looks for keys start_epoch and end_epoch in the
# given option hash, parses them as YYYY-MM-DD (where the letters
# are digits and the dashes are any non-digit punctuation), and
# replaces those keys' values with a reference to a list
# containing the output of timegm() for the given time. If only
# one epoch is provided, the other is defaulted to provide a
view all matches for this distribution
view release on metacpan or search on metacpan
standard version tags to 1.1x and HTN/0.2 repsectively. Removed
<WhereWhen type="stc"> tag to make the messages validate!
2005-12-28 Alasdair Allan <aa@astro.ex.ac.uk>
* VOEvent.pm: modifed time() method so it looks in <Who> if there
isn't a valid datestamp in the <WhereWhen> tag.
2005-12-19 Alasdair Allan <aa@astro.ex.ac.uk>
* VOEvent.pm: Fixed casing problem for <WhereWhen type="simple">,
view all matches for this distribution
view release on metacpan or search on metacpan
=back
=head1 BUGS
Likely many! Very little of the module has been tested. If you find
something that looks like a bug, please send a report.
=head1 AUTHOR
Pete Ratzlaff <pratzlaff@cfa.harvard.edu>
view all matches for this distribution
view release on metacpan or search on metacpan
inc/My/Module/Meta.pm view on Meta::CPAN
'Clone' => 0,
'Data::Dumper' => 0,
'Exporter' => 5.64,
'IO::File' => 0,
'POSIX' => 0,
'Scalar::Util' => 1.22, # For looks_like_number
'Time::Local' => 0,
base => 0,
constant => 0,
if => 0,
strict => 0,
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
if ( my $code = $sym->{$pwd} ) {
# Delegate back to parent dirs
goto &$code unless $cwd eq $pwd;
}
unless ($$sym =~ s/([^:]+)$//) {
# XXX: it looks like we can't retrieve the missing function
# via $$sym (usually $main::AUTOLOAD) in this case.
# I'm still wondering if we should slurp Makefile.PL to
# get some context or not ...
my ($package, $file, $line) = caller;
die <<"EOT";
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Async/Queue.pm view on Meta::CPAN
use 5.006;
use strict;
use warnings;
use Carp;
use Scalar::Util qw(looks_like_number);
sub new {
my ($class, %options) = @_;
my $self = bless {
concurrency => 1,
lib/Async/Queue.pm view on Meta::CPAN
sub concurrency {
my ($self, $conc) = @_;
if(@_ > 1) {
croak "You cannot set concurrency while there is a running task" if $self->running > 0;
$conc = 1 if not defined($conc);
croak "concurrency must be a number" if !looks_like_number($conc);
$self->{concurrency} = int($conc);
}
return $self->{concurrency};
}
view all matches for this distribution
view release on metacpan or search on metacpan
src/ppport.h view on Meta::CPAN
listkids|||
list|||
load_module_nocontext|||vn
load_module|5.006000||pv
localize|||
looks_like_bool|||
looks_like_number|||
lop|||
mPUSHi|5.009002||p
mPUSHn|5.009002||p
mPUSHp|5.009002||p
mPUSHs|5.010001||p
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
if ( my $code = $sym->{$pwd} ) {
# Delegate back to parent dirs
goto &$code unless $cwd eq $pwd;
}
unless ($$sym =~ s/([^:]+)$//) {
# XXX: it looks like we can't retrieve the missing function
# via $$sym (usually $main::AUTOLOAD) in this case.
# I'm still wondering if we should slurp Makefile.PL to
# get some context or not ...
my ($package, $file, $line) = caller;
die <<"EOT";
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
if ( my $code = $sym->{$pwd} ) {
# Delegate back to parent dirs
goto &$code unless $cwd eq $pwd;
}
unless ($$sym =~ s/([^:]+)$//) {
# XXX: it looks like we can't retrieve the missing function
# via $$sym (usually $main::AUTOLOAD) in this case.
# I'm still wondering if we should slurp Makefile.PL to
# get some context or not ...
my ($package, $file, $line) = caller;
die <<"EOT";
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
if ( my $code = $sym->{$pwd} ) {
# Delegate back to parent dirs
goto &$code unless $cwd eq $pwd;
}
unless ($$sym =~ s/([^:]+)$//) {
# XXX: it looks like we can't retrieve the missing function
# via $$sym (usually $main::AUTOLOAD) in this case.
# I'm still wondering if we should slurp Makefile.PL to
# get some context or not ...
my ($package, $file, $line) = caller;
die <<"EOT";
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
if ( my $code = $sym->{$pwd} ) {
# Delegate back to parent dirs
goto &$code unless $cwd eq $pwd;
}
unless ($$sym =~ s/([^:]+)$//) {
# XXX: it looks like we can't retrieve the missing function
# via $$sym (usually $main::AUTOLOAD) in this case.
# I'm still wondering if we should slurp Makefile.PL to
# get some context or not ...
my ($package, $file, $line) = caller;
die <<"EOT";
view all matches for this distribution