Astro-App-Satpass2
view release on metacpan or search on metacpan
lib/Astro/App/Satpass2.pm view on Meta::CPAN
}
# _is_interactive()
#
# Returns true if the dispatch() method is above us on the call
# stack, otherwise returns false.
use constant INTERACTIVE_CALLER => __PACKAGE__ . '::dispatch';
sub _is_interactive {
my $level = 0;
while ( my @info = caller( $level ) ) {
INTERACTIVE_CALLER eq $info[3]
and return $level;
$level++;
}
return;
}
# $self->_load_module ($module_name)
# Loads the module if it has not yet been loaded. Dies if it
lib/Astro/App/Satpass2.pm view on Meta::CPAN
$modver < $version{$module} and do {
push @probs,
"$module version $version{$module} needed";
next;
};
};
return $module;
}
{
my $inx = 1;
while (my @clr = caller($inx++)) {
$clr[3] eq '(eval)' and next;
my @raw = split '::', $clr[3];
substr ($raw[-1], 0, 1) eq '_' and next;
push @probs, "for method $raw[-1]";
last;
}
}
my $pfx = 'Error -';
$self->wail(map {my $x = "$pfx $_\n"; $pfx = ' ' x 7; $x} @probs);
return; # Can't get here, but Perl::Critic does not know this.
lib/Astro/App/Satpass2/Format/Template.pm view on Meta::CPAN
}
# _is_format()
#
# Returns true if the format() method is above us on the call
# stack, otherwise returns false.
use constant REPORT_CALLER => __PACKAGE__ . '::format';
sub _is_format {
my $level = 2; # Start with caller's caller.
while ( my @info = caller( $level ) ) {
REPORT_CALLER eq $info[3]
and return $level;
$level++;
}
return;
}
sub _localize {
my ( $report, $source, $default ) = @_;
defined $default
lib/Astro/App/Satpass2/Utils.pm view on Meta::CPAN
foreach my $key ( @orig_keys ) {
$opt_name{$key}
or __error_out( $self, wail => "Illegal option '$key'" );
}
_apply_default( $self, $opt, \@args );
return( $self, $opt, @args );
}
=begin comment
my @data = caller(1);
my $code = \&{$data[3]};
my ( $err, %opt );
my $lgl = $self->__get_attr($code, 'Verb') || [];
if ( @{ $lgl } && ':compute' eq $lgl->[0] ) {
my $method = $lgl->[1];
unless ( defined $method ) {
( $method = $data[3] ) =~ s/ .* :: //smx;
$method = "__${method}_options";
}
( run in 0.402 second using v1.01-cache-2.11-cpan-b61123c0432 )