view release on metacpan or search on metacpan
lib/Artifactory/Client.pm view on Meta::CPAN
}
sub _handle_matrix_props {
my ( $self, $key, $values ) = @_;
# string looks like key=val;key=val2;key=val3;
my @strings;
for my $value ( @{$values} ) {
$value = '' if ( !defined $value );
#$value = uri_escape( $value );
lib/Artifactory/Client.pm view on Meta::CPAN
}
sub _handle_non_matrix_props {
my ( $self, $key, $values ) = @_;
# string looks like key=val1,val2,val3|
my $str = "$key=";
my @value_holder;
for my $value ( @{$values} ) {
$value = '' if ( !defined $value );
$value = uri_escape($value);
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
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
lib/AsposeBarCodeCloud/ApiClient.pm view on Meta::CPAN
#
# @param integer $seconds Number of seconds before timing out [set to 0 for no timeout]
#
sub set_timeout {
my ($self, $seconds) = @_;
if (!looks_like_number($seconds)) {
croak('Timeout variable must be numeric.');
}
$self->{http_timeout} = $seconds;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AsposeCellsCloud/ApiClient.pm view on Meta::CPAN
#
# @param integer $seconds Number of seconds before timing out [set to 0 for no timeout]
#
sub set_timeout {
my ($self, $seconds) = @_;
if (!looks_like_number($seconds)) {
croak('Timeout variable must be numeric.');
}
$self->{http_timeout} = $seconds;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AsposeDiagramCloud/ApiClient.pm view on Meta::CPAN
#
# @param integer $seconds Number of seconds before timing out [set to 0 for no timeout]
#
sub set_timeout {
my ($self, $seconds) = @_;
if (!looks_like_number($seconds)) {
croak('Timeout variable must be numeric.');
}
$self->{http_timeout} = $seconds;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AsposeEmailCloud/ApiClient.pm view on Meta::CPAN
#
# @param integer $seconds Number of seconds before timing out [set to 0 for no timeout]
#
sub set_timeout {
my ($self, $seconds) = @_;
if (!looks_like_number($seconds)) {
croak('Timeout variable must be numeric.');
}
$self->{http_timeout} = $seconds;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AsposeImagingCloud/ApiClient.pm view on Meta::CPAN
#
# @param integer $seconds Number of seconds before timing out [set to 0 for no timeout]
#
sub set_timeout {
my ($self, $seconds) = @_;
if (!looks_like_number($seconds)) {
croak('Timeout variable must be numeric.');
}
$self->{http_timeout} = $seconds;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AsposeOcrCloud/ApiClient.pm view on Meta::CPAN
#
# @param integer $seconds Number of seconds before timing out [set to 0 for no timeout]
#
sub set_timeout {
my ($self, $seconds) = @_;
if (!looks_like_number($seconds)) {
croak('Timeout variable must be numeric.');
}
$self->{http_timeout} = $seconds;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AsposePdfCloud/ApiClient.pm view on Meta::CPAN
#
# @param integer $seconds Number of seconds before timing out [set to 0 for no timeout]
#
sub set_timeout {
my ($self, $seconds) = @_;
if (!looks_like_number($seconds)) {
croak('Timeout variable must be numeric.');
}
$self->{http_timeout} = $seconds;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AsposeStorageCloud/ApiClient.pm view on Meta::CPAN
#
# @param integer $seconds Number of seconds before timing out [set to 0 for no timeout]
#
sub set_timeout {
my ($self, $seconds) = @_;
if (!looks_like_number($seconds)) {
croak('Timeout variable must be numeric.');
}
$self->{http_timeout} = $seconds;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AsposeTasksCloud/ApiClient.pm view on Meta::CPAN
#
# @param integer $seconds Number of seconds before timing out [set to 0 for no timeout]
#
sub set_timeout {
my ($self, $seconds) = @_;
if (!looks_like_number($seconds)) {
croak('Timeout variable must be numeric.');
}
$self->{http_timeout} = $seconds;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AsposeThreeDCloud/ApiClient.pm view on Meta::CPAN
#
# @param integer $seconds Number of seconds before timing out [set to 0 for no timeout]
#
sub set_timeout {
my ($self, $seconds) = @_;
if (!looks_like_number($seconds)) {
croak('Timeout variable must be numeric.');
}
$self->{http_timeout} = $seconds;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AsposeWordsCloud/ApiClient.pm view on Meta::CPAN
#
# @param integer $seconds Number of seconds before timing out [set to 0 for no timeout]
#
sub set_timeout {
my ($self, $seconds) = @_;
if (!looks_like_number($seconds)) {
croak('Timeout variable must be numeric.');
}
$self->{http_timeout} = $seconds;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Assert/Conditional.pm view on Meta::CPAN
use Carp qw(carp croak cluck confess);
use POSIX ":sys_wait_h";
use Scalar::Util qw{
blessed
looks_like_number
openhandle
refaddr
reftype
};
lib/Assert/Conditional.pm view on Meta::CPAN
:Assert( qw[number] )
{
&assert_defined;
&assert_nonref;
my($n) = @_;
looks_like_number($n) || botch "'$n' doesn't look like a number";
}
sub assert_nonnumeric($)
:Assert( qw[number] )
{
&assert_nonref;
my($n) = @_;
!looks_like_number($n) || botch "'$n' looks like a number";
}
sub assert_positive($)
:Assert( qw[number] )
{
lib/Assert/Conditional.pm view on Meta::CPAN
=over
=item assert_numeric(I<EXPR>)
The defined non-ref argument looks like a number suitable for implicit
conversion according to the builtin L<Scalar::Util/looks_like_number>
predicate.
=item assert_nonnumeric(I<EXPR>)
The defined non-ref argument does I<not> look like a number suitable for
implicit conversion, again per L<Scalar::Util/looks_like_number>.
=item assert_positive(I<EXPR>)
The defined non-ref argument is numerically greater than zero.
lib/Assert/Conditional.pm view on Meta::CPAN
- Reworked the hash key checkers into a simpler set: assert_keys, assert_min_keys, assert_max_keys, assert_minmax_keys.
- Added invocant-specific assertions: assert_{object,class}_{isa,ainta,can,cant}.
- Added assertions for ties, overloads, and locked hashes.
- Made assert_private_method work despite Moose wrappers.
- Added assert_protected_method that works despite Moose wrappers and roles.
- Improved the looks of the uncompiled code for assert_happy_code.
- Fixed botch() to identify the most distant stack frame not the nearest for the name of the failed assertion.
- Improved the reporting of some assertion failures.
0.006 Mon May 21 07:45:43 CDT 2018
- Use hash_{,un}locked not hashref_{,un}locked to support pre-5.16 perls.
view all matches for this distribution
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/Assert/Refute/Build.pm view on Meta::CPAN
=cut
use Carp;
use Data::Dumper;
use Scalar::Util qw(weaken blessed set_prototype looks_like_number refaddr);
use parent qw(Exporter);
our @EXPORT = qw(build_refute current_contract to_scalar);
# NOTE HACK
# If we're being loaded after Test::More, we're *likely* inside a test script
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Astro/ADS/QTree.pm view on Meta::CPAN
=head2 move_to
This method takes advantage of the Mojo::Asset's C<move_to> function to save the
content to a file. Currently, it saves the whole body of the response, whereas
the qtree value looks like it wants to be its own file, given the number of C<\n>
in the string.
=head1 See Also
=over 4
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