view release on metacpan or search on metacpan
inc/Module/Install/Makefile.pm view on Meta::CPAN
sub Makefile { $_[0] }
my %seen = ();
sub prompt {
shift;
# Infinite loop protection
my @c = caller();
if ( ++$seen{"$c[1]|$c[2]|$_[0]"} > 3 ) {
die "Caught an potential prompt infinite loop ($c[1]|$c[2]|$_[0])";
}
# In automated testing, always use defaults
if ( $ENV{AUTOMATED_TESTING} and ! $ENV{PERL_MM_USE_DEFAULT} ) {
local $ENV{PERL_MM_USE_DEFAULT} = 1;
goto &ExtUtils::MakeMaker::prompt;
} else {
goto &ExtUtils::MakeMaker::prompt;
}
}
sub makemaker_args {
my $self = shift;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Makefile.pm view on Meta::CPAN
sub Makefile { $_[0] }
my %seen = ();
sub prompt {
shift;
# Infinite loop protection
my @c = caller();
if ( ++$seen{"$c[1]|$c[2]|$_[0]"} > 3 ) {
die "Caught an potential prompt infinite loop ($c[1]|$c[2]|$_[0])";
}
# In automated testing or non-interactive session, always use defaults
if ( ($ENV{AUTOMATED_TESTING} or -! -t STDIN) and ! $ENV{PERL_MM_USE_DEFAULT} ) {
local $ENV{PERL_MM_USE_DEFAULT} = 1;
goto &ExtUtils::MakeMaker::prompt;
} else {
goto &ExtUtils::MakeMaker::prompt;
}
}
# Store a cleaned up version of the MakeMaker version,
# since we need to behave differently in a variety of
view all matches for this distribution
view release on metacpan or search on metacpan
lib/ArrayData/Lingua/Word/EN/Enable.pm view on Meta::CPAN
imprisons
improbabilities
improbability
improbable
improbably
impromptu
impromptus
improper
improperly
improperness
impropernesses
improprieties
lib/ArrayData/Lingua/Word/EN/Enable.pm view on Meta::CPAN
promotional
promotions
promotive
promotiveness
promotivenesses
prompt
promptbook
promptbooks
prompted
prompter
prompters
promptest
prompting
promptitude
promptitudes
promptly
promptness
promptnesses
prompts
proms
promulgate
promulgated
promulgates
promulgating
lib/ArrayData/Lingua/Word/EN/Enable.pm view on Meta::CPAN
unprogrammable
unprogrammed
unprogressive
unpromising
unpromisingly
unprompted
unpronounceable
unpronounced
unpropitious
unprosperous
unprotected
view all matches for this distribution
view release on metacpan or search on metacpan
lib/ArrayData/Lingua/Word/EN/Medical/Glutanimate.pm view on Meta::CPAN
promontorium
promontory
promoter
promotion
promoxolane
prompt
Promus
Promycin
promyelocyte
promyelocytic
pronate
view all matches for this distribution
view release on metacpan or search on metacpan
lib/ArrayData/Word/EN/Enable.pm view on Meta::CPAN
imprisons
improbabilities
improbability
improbable
improbably
impromptu
impromptus
improper
improperly
improperness
impropernesses
improprieties
lib/ArrayData/Word/EN/Enable.pm view on Meta::CPAN
promotional
promotions
promotive
promotiveness
promotivenesses
prompt
promptbook
promptbooks
prompted
prompter
prompters
promptest
prompting
promptitude
promptitudes
promptly
promptness
promptnesses
prompts
proms
promulgate
promulgated
promulgates
promulgating
lib/ArrayData/Word/EN/Enable.pm view on Meta::CPAN
unprogrammable
unprogrammed
unprogressive
unpromising
unpromisingly
unprompted
unpronounceable
unpronounced
unpropitious
unprosperous
unprotected
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Articulate/Authentication/Preconfigured.pm view on Meta::CPAN
=head1 WARNING
Warning: This is highly insecure, you will be storing your passwords in plain text in the configuration file.
It is suitable only for getting a project started, and should be promptly removed when a user account has been created which stores encrypted passwords somewhere.
=head1 CONFIGURATION
authentication:
Articulate::Authentication:
view all matches for this distribution
view release on metacpan or search on metacpan
info("Then clap your hands!");
}
=head1 DESCRIPTION
The C<Ask> suite is a set of modules for interacting with users; prompting
them for information, displaying messages, warnings and errors, etc.
There are already countless CPAN modules for doing this sort of thing, but
what sets C<Ask> apart from them is that C<Ask> will detect how your script
is being run (in a terminal, headless, etc) and choose an appropriate way
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Makefile.pm view on Meta::CPAN
sub Makefile { $_[0] }
my %seen = ();
sub prompt {
shift;
# Infinite loop protection
my @c = caller();
if ( ++$seen{"$c[1]|$c[2]|$_[0]"} > 3 ) {
die "Caught an potential prompt infinite loop ($c[1]|$c[2]|$_[0])";
}
# In automated testing or non-interactive session, always use defaults
if ( ($ENV{AUTOMATED_TESTING} or -! -t STDIN) and ! $ENV{PERL_MM_USE_DEFAULT} ) {
local $ENV{PERL_MM_USE_DEFAULT} = 1;
goto &ExtUtils::MakeMaker::prompt;
} else {
goto &ExtUtils::MakeMaker::prompt;
}
}
# Store a cleaned up version of the MakeMaker version,
# since we need to behave differently in a variety of
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Makefile.pm view on Meta::CPAN
sub Makefile { $_[0] }
my %seen = ();
sub prompt {
shift;
# Infinite loop protection
my @c = caller();
if ( ++$seen{"$c[1]|$c[2]|$_[0]"} > 3 ) {
die "Caught an potential prompt infinite loop ($c[1]|$c[2]|$_[0])";
}
# In automated testing or non-interactive session, always use defaults
if ( ($ENV{AUTOMATED_TESTING} or -! -t STDIN) and ! $ENV{PERL_MM_USE_DEFAULT} ) {
local $ENV{PERL_MM_USE_DEFAULT} = 1;
goto &ExtUtils::MakeMaker::prompt;
} else {
goto &ExtUtils::MakeMaker::prompt;
}
}
# Store a cleaned up version of the MakeMaker version,
# since we need to behave differently in a variety of
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Makefile.pm view on Meta::CPAN
sub Makefile { $_[0] }
my %seen = ();
sub prompt {
shift;
# Infinite loop protection
my @c = caller();
if ( ++$seen{"$c[1]|$c[2]|$_[0]"} > 3 ) {
die "Caught an potential prompt infinite loop ($c[1]|$c[2]|$_[0])";
}
# In automated testing or non-interactive session, always use defaults
if ( ($ENV{AUTOMATED_TESTING} or -! -t STDIN) and ! $ENV{PERL_MM_USE_DEFAULT} ) {
local $ENV{PERL_MM_USE_DEFAULT} = 1;
goto &ExtUtils::MakeMaker::prompt;
} else {
goto &ExtUtils::MakeMaker::prompt;
}
}
# Store a cleaned up version of the MakeMaker version,
# since we need to behave differently in a variety of
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Makefile.pm view on Meta::CPAN
sub Makefile { $_[0] }
my %seen = ();
sub prompt {
shift;
# Infinite loop protection
my @c = caller();
if ( ++$seen{"$c[1]|$c[2]|$_[0]"} > 3 ) {
die "Caught an potential prompt infinite loop ($c[1]|$c[2]|$_[0])";
}
# In automated testing or non-interactive session, always use defaults
if ( ($ENV{AUTOMATED_TESTING} or -! -t STDIN) and ! $ENV{PERL_MM_USE_DEFAULT} ) {
local $ENV{PERL_MM_USE_DEFAULT} = 1;
goto &ExtUtils::MakeMaker::prompt;
} else {
goto &ExtUtils::MakeMaker::prompt;
}
}
# Store a cleaned up version of the MakeMaker version,
# since we need to behave differently in a variety of
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Makefile.pm view on Meta::CPAN
sub Makefile { $_[0] }
my %seen = ();
sub prompt {
shift;
# Infinite loop protection
my @c = caller();
if ( ++$seen{"$c[1]|$c[2]|$_[0]"} > 3 ) {
die "Caught an potential prompt infinite loop ($c[1]|$c[2]|$_[0])";
}
# In automated testing or non-interactive session, always use defaults
if ( ($ENV{AUTOMATED_TESTING} or -! -t STDIN) and ! $ENV{PERL_MM_USE_DEFAULT} ) {
local $ENV{PERL_MM_USE_DEFAULT} = 1;
goto &ExtUtils::MakeMaker::prompt;
} else {
goto &ExtUtils::MakeMaker::prompt;
}
}
# Store a cleaned up version of the MakeMaker version,
# since we need to behave differently in a variety of
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Makefile.pm view on Meta::CPAN
sub Makefile { $_[0] }
my %seen = ();
sub prompt {
shift;
# Infinite loop protection
my @c = caller();
if ( ++$seen{"$c[1]|$c[2]|$_[0]"} > 3 ) {
die "Caught an potential prompt infinite loop ($c[1]|$c[2]|$_[0])";
}
# In automated testing or non-interactive session, always use defaults
if ( ($ENV{AUTOMATED_TESTING} or -! -t STDIN) and ! $ENV{PERL_MM_USE_DEFAULT} ) {
local $ENV{PERL_MM_USE_DEFAULT} = 1;
goto &ExtUtils::MakeMaker::prompt;
} else {
goto &ExtUtils::MakeMaker::prompt;
}
}
# Store a cleaned up version of the MakeMaker version,
# since we need to behave differently in a variety of
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Makefile.pm view on Meta::CPAN
sub Makefile { $_[0] }
my %seen = ();
sub prompt {
shift;
# Infinite loop protection
my @c = caller();
if ( ++$seen{"$c[1]|$c[2]|$_[0]"} > 3 ) {
die "Caught an potential prompt infinite loop ($c[1]|$c[2]|$_[0])";
}
# In automated testing or non-interactive session, always use defaults
if ( ($ENV{AUTOMATED_TESTING} or -! -t STDIN) and ! $ENV{PERL_MM_USE_DEFAULT} ) {
local $ENV{PERL_MM_USE_DEFAULT} = 1;
goto &ExtUtils::MakeMaker::prompt;
} else {
goto &ExtUtils::MakeMaker::prompt;
}
}
# Store a cleaned up version of the MakeMaker version,
# since we need to behave differently in a variety of
view all matches for this distribution
view release on metacpan or search on metacpan
},
);
# Collect some info about AMI account to use for testing
my $ami_host = $build->prompt("Specify AMI host for test:", 'localhost');
my $ami_port = $build->prompt("Specify AMI port for test:", 5038 );
my $ami_user = $build->prompt("Specify AMI user for test:");
my $ami_secret = $build->prompt("Specify AMI secret for test:");
$build->notes(ami_host => $ami_host );
$build->notes(ami_port => $ami_port );
$build->notes(ami_user => $ami_user );
$build->notes(ami_secret => $ami_secret);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Astro/App/Satpass2.pm view on Meta::CPAN
almanac_horizon => \&_set_almanac_horizon,
appulse => \&_set_angle,
autoheight => \&_set_unmodified,
backdate => \&_set_unmodified,
background => \&_set_unmodified,
continuation_prompt => \&_set_unmodified,
country => \&_set_unmodified,
date_format => \&_set_formatter_attribute,
desired_equinox_dynamical => \&_set_formatter_attribute,
debug => \&_set_unmodified,
echo => \&_set_unmodified,
lib/Astro/App/Satpass2.pm view on Meta::CPAN
max_mirror_angle => \&_set_angle,
output_layers => \&_set_output_layers,
pass_threshold => \&_set_angle_or_undef,
pass_variant => \&_set_pass_variant,
perltime => \&_set_time_parser_attribute,
prompt => \&_set_unmodified,
refraction => \&_set_unmodified,
simbad_url => \&_set_unmodified,
singleton => \&_set_unmodified,
spacetrack => \&_set_spacetrack,
stdout => \&_set_stdout,
lib/Astro/App/Satpass2.pm view on Meta::CPAN
almanac_horizon => 0,
appulse => 0,
autoheight => 1,
background => 1,
backdate => 0,
continuation_prompt => '> ',
date_format => '%a %d-%b-%Y',
debug => 0,
echo => 0,
edge_of_earths_shadow => 1,
ellipsoid => Astro::Coord::ECI->get ('ellipsoid'),
lib/Astro/App/Satpass2.pm view on Meta::CPAN
undef,
model => 'model',
# pending => undef, # Continued input line if it exists.
pass_variant => PASS_VARIANT_NONE,
perltime => 0,
prompt => 'satpass2> ',
refraction => 1,
simbad_url => 'simbad.u-strasbg.fr',
singleton => 0,
# spacetrack => undef, # Astro::SpaceTrack object set when accessed
# stdout => undef, # Set to stdout in new().
lib/Astro/App/Satpass2.pm view on Meta::CPAN
my $in;
my $extern;
if ( CODE_REF eq ref $args[0] ) {
$extern = shift @args;
$in = sub {
my ( $prompt ) = @_;
@args and return shift @args;
return $extern->( $prompt );
};
} else {
$in = sub { return shift @args };
}
@args = map { split qr{ (?<= \n ) }smx, $_ } @args;
while ( defined ( local $_ = $in->( $self->get( 'prompt' ) ) ) ) {
$self->{echo} and $self->whinge($self->get( 'prompt' ), $_);
m/ \A \s* [#] /smx and next;
my $stdout = $self->{frame}[-1]{stdout};
my ($args, $redirect) = $self->__tokenize(
{ in => $in }, $_, $self->{frame}[-1]{args});
# NOTICE
lib/Astro/App/Satpass2.pm view on Meta::CPAN
# Execution loop. What exit() really does is a last on this.
SATPASS2_EXECUTE:
{
$self->_execute( @args );
while ( defined ( my $buffer = $in->( $self->get( 'prompt' ) ) ) ) {
$self->_execute( $in, $buffer );
}
}
$self->_execute( q{echo ''} ); # The lazy way to be sure we
# have a newline before exit.
lib/Astro/App/Satpass2.pm view on Meta::CPAN
}
# $code = $satpass2->_get_readline();
#
# Returns code to read input. The code takes an argument which
# will be used as a prompt if one is needed. What is actually
# returned is:
#
# If $satpass2->_get_interactive() is false, the returned code
# just reads standard in. Otherwise,
#
lib/Astro/App/Satpass2.pm view on Meta::CPAN
}
# $line = $self->_read_continuation( $in, $error_message );
#
# Acquire a line from $in, which must be a code reference taking
# the prompt as an argument. If $in is not a code reference, or if
# it returns undef, we wail() with the error message. Otherwise
# we return the line read. I expect this to be used only by
# __tokenize().
sub _read_continuation {
my ( $self, $in, $error ) = @_;
$in and defined( my $more = $in->(
my $prompt = $self->get( 'continuation_prompt' ) ) )
or do {
$error or return;
ref $error eq CODE_REF
and return $error->();
$self->wail( $error );
};
$self->{echo} and $self->whinge( $prompt, $more );
$more =~ m/ \n \z /smx or $more .= "\n";
return $more;
}
# my ( $old_obj ) = $self->_replace_in_sky( $name, $new_obj );
lib/Astro/App/Satpass2.pm view on Meta::CPAN
use Astro::App::Satpass2;
Astro::App::Satpass2->run(@ARGV);
which is essentially the content of the F<satpass2> script. In this
last case, the user will be prompted for commands once the commands in
@ARGV are used up, unless those commands include 'exit'.
=head1 NOTICE
Geocoding using TomTom has been dropped as of version 0.024.
lib/Astro/App/Satpass2.pm view on Meta::CPAN
arguments are executed first. How commands are read from C<STDIN>
depends on a number of factors. If C<STDIN> is a terminal and
L<Term::ReadLine|Term::ReadLine> can be loaded, a
L<Term::ReadLine|Term::ReadLine> object is instantiated and used to read
input. If C<STDIN> is a terminal and L<Term::ReadLine|Term::ReadLine>
can not be loaded, the prompt is printed to C<STDERR> and C<STDIN> is
read. If C<STDIN> is not a terminal, it is read.
If L<Term::ReadLine|Term::ReadLine> is in use and can load
C<Term::ReadLine::Perl>, command editing, history, and completion are
available. Completion will include at least command, macro, and option
names, in addition to the file name completion built into
C<Term::ReadLine::Perl>.
The default command acquisition behavior can be changed by passing, as
the first argument, a code reference. This should refer to a subroutine
that expects the prompt as its only argument, and returns the next
input. This code should return C<undef> to indicate a logical
end-of-file.
The exit command causes the method to return.
This method can also be called on an Astro::App::Satpass2 object. For example:
use Astro::App::Satpass2;
my $app = Astro::App::Satpass2->new(
prompt => 'Your wish is my command: '
);
$app->run();
=head2 save
$satpass2->save( $file_name );
satpass2> save file_name
This interactive method saves your current settings to the named file.
If no file is named, they are saved to the default configuration file.
If the file already exists, you will be prompted unless you specified
the C<-overwrite> option. Nothing is returned.
File name F<-> is special, and causes output to go wherever standard
output is being sent.
lib/Astro/App/Satpass2.pm view on Meta::CPAN
This boolean attribute determines whether the location of the background
body is displayed when the L</appulse> logic detects an appulse.
The default is 1 (i.e. true).
=head2 continuation_prompt
This string attribute specifies the string used to prompt for
continuations of lines.
The default is C<< '> ' >>.
=head2 country
lib/Astro/App/Satpass2.pm view on Meta::CPAN
L<Astro::App::Satpass2::ParseTime::Date::Manip::v5|Astro::App::Satpass2::ParseTime::Date::Manip::v5>
uses this attribute.
The default will normally be 0 (i.e. false).
=head2 prompt
This string attribute specifies the string used to prompt for commands.
The default is C<< 'satpass2> ' >>.
=head2 refraction
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Tk/AstroCatalog.pm view on Meta::CPAN
}
}
=item getSource
getSource prompts the user to enter source coords and name
and filters the catalog based on the input provided.
Takes the new top level widget to use, and the search button
to be re-activated when this window closes.
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
use lib qw{ inc };
use My::Module::Meta;
use My::Module::Recommend;
use ExtUtils::MakeMaker qw{WriteMakefile prompt};
use FileHandle;
use Getopt::Std;
my %opt;
getopts ('ny', \%opt) or die <<eod;
view all matches for this distribution
view release on metacpan or search on metacpan
$self->{'debug'} = $params{'debug'} || 0;
$self->{'work_dir'} = $params{'work_dir'} || cwd;
$self->{'log'} = $params{'log'} || *STDERR;
$self->{'display_startup'} = $params{'display_startup'} || 0;
$self->{'cl_prompt'} = qr/^cl>\s+/;
$self->{'continue_prompt'} = qr/>>>\s+/;
$self->{'packages'} = []; # For loading/unloading packages.
$self->{'command_history'} = [];
$self->{'dead'} = 1; # It is dead until the CL is running.
chdir $self->{'iraf_start'} ||croak "Could not cd to $self->{'iraf_start'}";
my $t = Expect->spawn('cl') || croak "Cannot spawn CL: $!";
$t->expect(30,'-re',$self->{'cl_prompt'});
croak "Did not get CL prompt after starting up" if $t->error;
$self->{'dead'} = 0; # It is now alive.
my $output = $t->before();
my @output = split /\n/,$output;
chdir $self->{'work_dir'} || croak "Could not cd to $self->{'work_dir'}";
$t->print("cd $self->{'work_dir'}\r");
$t->expect($TIMEOUT,"cd $self->{'work_dir'}\r\n");
$t->expect($TIMEOUT,'-re',$self->{'cl_prompt'});
croak "Did not get CL prompt back after trying to cd to $self->{'cl_prompt'}"
if $t->error;
return $t;
}
$self->end() if !$self->{'dead'};
# Reset various parameters so everything works nicely.
$self->{'dead'} = 0;
$self->{'cl_prompt'} = qr/^cl>\s+/;
$self->{'session'} = $self->_startup;
$self->_get_available_commands_and_packages('main');
my $session = $self->{'session'};
$session->print("$command\r");
$session->expect($TIMEOUT,"$command\r\n");
$session->expect($TIMEOUT,'-re',$self->{'cl_prompt'});
my $output = $session->before();
$output =~ s/(\r\n)*$//;
return $output;
}
sub _register_package{
my ($self,$package) = @_;
my $new_prompt = $self->_get_package_prompt($package);
$self->_set_cl_prompt($new_prompt);
unshift @{$self->{'packages'}},$package;
}
sub _get_package_prompt{
my ($self,$package) = @_;
my $new_prompt = substr($package,0,2);
$new_prompt = qr/^$new_prompt>\s+/;
return $new_prompt;
}
sub _deregister_package{
my ($self,$package) = @_;
shift @{$self->{'packages'}};
my $next_package = $self->get_current_package() || 'cl';
my $new_prompt = $self->_get_package_prompt($next_package);
$self->_set_cl_prompt($new_prompt);
}
sub unload_package{
my ($self,$package) = @_;
}
## Set parameter routines
sub _set_cl_prompt{
my ($self,$prompt) = @_;
$self->{'cl_prompt'} = $prompt;
}
sub set_log{
my ($self,$log) = @_;
sub cl_warning_handler{
my ($self,$command,$handler) = @_;
my $session = $self->{'session'};
$session->expect($TIMEOUT,'-re',$self->{'cl_prompt'});
my $error = $session->before();
print STDERR "The command $command encountered a CL Warning:\n\n$error\n";
sub cl_error_handler{
my ($self,$command,$handler) = @_;
my $session = $self->{'session'};
$session->expect($TIMEOUT,'-re',$self->{'cl_prompt'});
my $error = $session->before();
print STDERR "The command $command encountered a CL ERROR:\n\n$error\n";
my ($self,$command,$timeout,$handler) = @_;
my $session = $self->{'session'};
$session->print("\cc"); # Send the command a control-c to stop it
$session->expect($TIMEOUT,'-re',$self->{'cl_prompt'},
[eof => sub{&eof_handler($self,"control-c to $command")}]);
print STDERR "The command \"$command\" timed out after $timeout seconds\n";
if (defined $handler){
for my $k (0..($#strings-1)){
$command_part = $strings[$k];
$t->print("$command_part \\\r");
$t->expect($TIMEOUT,'-ex',"$command_part \\\r\n");
$t->expect($TIMEOUT,'-re',$self->{'continue_prompt'});
}
$command_part = $strings[$#strings];
$t->print("$command_part\r");
$t->expect($TIMEOUT,'-ex',"$command_part\r\n");
'-ex',"$command\r\n");
}
## Package management.
my $possible_prompt = '#THIS SHOULD NEVER BE MATCHED#'; # Unless changed.
if ($command =~ m/^\s*bye\s*$/){ # Removing the current package.
$self->_deregister_package();
}
elsif ($command =~ m/^\s*\w+\s*$/){ # Possibly loading new package.
if ($self->package_is_available($command)){
$possible_prompt = $self->_get_package_prompt($command);
}
}
##
$t->expect($timeout,
$error_handler);
$q_error = 1; exp_continue},
'-ex','No help available for',sub{print STDERR "No help available for $helpname\n";
$not_available = 1;
},
'-re',$possible_prompt,sub{$self->_register_package($command)},
'-re',$self->{'cl_prompt'});
next if ($q_timeout || $q_error || $q_eof || $not_available);
my $output = $t->exp_before();
my @lines = split /\n/,$output;
$self->unload_all_packages;
my $t = $self->{'session'};
$t->print("\r");
$t->expect($TIMEOUT,'-re',$self->{'cl_prompt'});
$t->print("logout\r");
$t->expect($TIMEOUT,"logout\r\n");
$t->soft_close();
package_exists($package) - Checks if an IRAF package is available for loading, (via the IRAF command "deftask") returns 1, if true, else 0.
=item *
unload_package($package) - Unload a package (the same as typing "bye" in CL). Note that you must unload in the correct order (last in - first out) or the script will die as it would not be able to keep a correct track of the current package and its a...
=item *
unload_all_packages - Unload all packages that have been loaded in the current session, this is called automatically when the script ends or the object goes out of scope in anyway.
You can create as many concurrent IRAF objects as you want (or your system can manage anyway). You should note that each one really needs its own uparm directoctory from which to work to avoid parameter value collisions which could cause chaos. This ...
Some IRAF programs may need more persuasion than others to believe that they are being used in a non-interactive mode (well non-graphical anyway). If you have problems with this, you could try using the IRAF command "stty xterm", this has worked for ...
The script will convert long commands into lots of shorter strings and enter each into the CL interpreter followed by a line continuation. This allows much longer commands to be entered than by just sending it all in one go. The routine tries to brea...
=head1 BUGS
These are not so much bugs as short-comings with the current code.
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/AutoInstall.pm view on Meta::CPAN
$AllDeps = 1;
}
}
}
# overrides MakeMaker's prompt() to automatically accept the default choice
sub _prompt {
goto &ExtUtils::MakeMaker::prompt unless $AcceptDefault;
my ( $prompt, $default ) = @_;
my $y = ( $default =~ /^[Yy]/ );
print $prompt, ' [', ( $y ? 'Y' : 'y' ), '/', ( $y ? 'n' : 'N' ), '] ';
print "$default\n";
return $default;
}
# the workhorse
inc/Module/AutoInstall.pm view on Meta::CPAN
map { +{@args}->{$_} }
grep { /^[^\-]/ or /^-core$/i } keys %{ +{@args} }
)[0]
);
# We want to know if we're under CPAN early to avoid prompting, but
# if we aren't going to try and install anything anyway then skip the
# check entirely since we don't want to have to load (and configure)
# an old CPAN just for a cosmetic message
$UnderCPAN = _check_lock(1) unless $SkipInstall;
inc/Module/AutoInstall.pm view on Meta::CPAN
!$SkipInstall
and (
$CheckOnly
or ($mandatory and $UnderCPAN)
or $AllDeps
or _prompt(
qq{==> Auto-install the }
. ( @required / 2 )
. ( $mandatory ? ' mandatory' : ' optional' )
. qq{ module(s) from CPAN?},
$default ? 'y' : 'n',
inc/Module/AutoInstall.pm view on Meta::CPAN
elsif ( !$SkipInstall
and $default
and $mandatory
and
_prompt( qq{==> The module(s) are mandatory! Really skip?}, 'n', )
=~ /^[Nn]/ )
{
push( @Missing, @required );
$DisabledTests{$_} = 1 for map { glob($_) } @skiptests;
}
inc/Module/AutoInstall.pm view on Meta::CPAN
return
if _version_cmp( _load($class), $ver ) >= 0; # no need to upgrade
if (
_prompt( "==> A newer version of $class ($ver) is required. Install?",
'y' ) =~ /^[Nn]/
)
{
die "*** Please install $class $ver manually.\n";
}
inc/Module/AutoInstall.pm view on Meta::CPAN
# check if we're connected to some host, using inet_aton
sub _connected_to {
my $site = shift;
return (
( _load('Socket') and Socket::inet_aton($site) ) or _prompt(
qq(
*** Your host cannot resolve the domain name '$site', which
probably means the Internet connections are unavailable.
==> Should we try to install the required module(s) anyway?), 'n'
) =~ /^[Yy]/
inc/Module/AutoInstall.pm view on Meta::CPAN
*** You are not allowed to write to the directory '$path';
the installation may fail due to insufficient permissions.
.
if (
eval '$>' and lc(`sudo -V`) =~ /version/ and _prompt(
qq(
==> Should we try to re-execute the autoinstall process with 'sudo'?),
((-t STDIN) ? 'y' : 'n')
) =~ /^[Yy]/
)
inc/Module/AutoInstall.pm view on Meta::CPAN
print << ".";
*** The 'sudo' command exited with error! Resuming...
.
}
return _prompt(
qq(
==> Should we try to install the required module(s) anyway?), 'n'
) =~ /^[Yy]/;
}
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/AutoInstall.pm view on Meta::CPAN
$TestOnly = 1;
}
}
}
# overrides MakeMaker's prompt() to automatically accept the default choice
sub _prompt {
goto &ExtUtils::MakeMaker::prompt unless $AcceptDefault;
my ( $prompt, $default ) = @_;
my $y = ( $default =~ /^[Yy]/ );
print $prompt, ' [', ( $y ? 'Y' : 'y' ), '/', ( $y ? 'n' : 'N' ), '] ';
print "$default\n";
return $default;
}
# the workhorse
inc/Module/AutoInstall.pm view on Meta::CPAN
if (
!$SkipInstall
and (
$CheckOnly
or _prompt(
qq{==> Auto-install the }
. ( @required / 2 )
. ( $mandatory ? ' mandatory' : ' optional' )
. qq{ module(s) from CPAN?},
$default ? 'y' : 'n',
inc/Module/AutoInstall.pm view on Meta::CPAN
elsif ( !$SkipInstall
and $default
and $mandatory
and
_prompt( qq{==> The module(s) are mandatory! Really skip?}, 'n', )
=~ /^[Nn]/ )
{
push( @Missing, @required );
$DisabledTests{$_} = 1 for map { glob($_) } @skiptests;
}
inc/Module/AutoInstall.pm view on Meta::CPAN
return
if defined( _version_check( _load($class), $ver ) ); # no need to upgrade
if (
_prompt( "==> A newer version of $class ($ver) is required. Install?",
'y' ) =~ /^[Nn]/
)
{
die "*** Please install $class $ver manually.\n";
}
inc/Module/AutoInstall.pm view on Meta::CPAN
# check if we're connected to some host, using inet_aton
sub _connected_to {
my $site = shift;
return (
( _load('Socket') and Socket::inet_aton($site) ) or _prompt(
qq(
*** Your host cannot resolve the domain name '$site', which
probably means the Internet connections are unavailable.
==> Should we try to install the required module(s) anyway?), 'n'
) =~ /^[Yy]/
inc/Module/AutoInstall.pm view on Meta::CPAN
*** You are not allowed to write to the directory '$path';
the installation may fail due to insufficient permissions.
.
if (
eval '$>' and lc(`sudo -V`) =~ /version/ and _prompt(
qq(
==> Should we try to re-execute the autoinstall process with 'sudo'?),
((-t STDIN) ? 'y' : 'n')
) =~ /^[Yy]/
)
inc/Module/AutoInstall.pm view on Meta::CPAN
print << ".";
*** The 'sudo' command exited with error! Resuming...
.
}
return _prompt(
qq(
==> Should we try to install the required module(s) anyway?), 'n'
) =~ /^[Yy]/;
}
view all matches for this distribution
view release on metacpan or search on metacpan
Criticize code as part of developer testing.
Drop unneeded 'use FileHandle' from Build.PL.
Have Build.PL and Makefile.PL handle -y and -n to supress prompt and
install or not install simbadc respectively.
Correct 'help client' in bin/simbadc
Update t/vo.t to track the fact that the SIMBAD4 URL query has gone
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Devel/CheckLib.pm view on Meta::CPAN
use Devel::CheckLib;
check_lib_or_exit( lib => 'jpeg', header => 'jpeglib.h' );
check_lib_or_exit( lib => [ 'iconv', 'jpeg' ] );
# or prompt for path to library and then do this:
check_lib_or_exit( lib => 'jpeg', libpath => $additional_path );
=head1 USING IT IN Makefile.PL or Build.PL
If you want to use this from Makefile.PL or Build.PL, do
inc/Devel/CheckLib.pm view on Meta::CPAN
=head2 check_lib_or_exit
This behaves exactly the same as C<assert_lib()> except that instead of
dieing, it warns (with exactly the same error message) and exits.
This is intended for use in Makefile.PL / Build.PL
when you might want to prompt the user for various paths and
things before checking that what they've told you is sane.
If any library or header is missing, it exits with an exit value of 0 to avoid
causing a CPAN Testers 'FAIL' report. CPAN Testers should ignore this
result -- which is what you want if an external library dependency is not
inc/Devel/CheckLib.pm view on Meta::CPAN
David Golden E<lt>dagolden@cpan.orgE<gt>
Yasuhiro Matsumoto E<lt>mattn@cpan.orgE<gt>
Thanks to the cpan-testers-discuss mailing list for prompting us to write it
in the first place;
to Chris Williams for help with Borland support;
to Tony Cook for help with Microsoft compiler command-line options
view all matches for this distribution
view release on metacpan or search on metacpan
SkyX_Test.pl view on Meta::CPAN
print "\n\nWARNING: Executing module fuctions that move the telescope\n";
print " can result in damage to your telescope, mount, and accessories.\n";
print " Make sure your telescope is clear of obstructions, you pick\n";
print " a safe slew target and your observatory roof is open!\n";
print "\n\n To execute move telescope functions you must type YES at the\n";
print "prompt: ";
chomp ($answer = <>);
if ( $answer eq 'YES' ) {
$movetests = 1;
}
print "\n\n Enter a safe target (slew and info tests): ";
view all matches for this distribution
view release on metacpan or search on metacpan
inc/My/Module/Test.pm view on Meta::CPAN
last_modified
most_recent_http_response
not_defined
site_check
spacetrack_user
spacetrack_skip_no_prompt
skip_site
throws_exception
VERIFY_HOSTNAME
};
inc/My/Module/Test.pm view on Meta::CPAN
require IO::Handle;
STDERR->autoflush( 1 );
};
}
sub prompt {
my @args = @_;
my $opt = HASH_REF eq ref $args[0] ? shift @args : {};
$readkey_loaded
or not $opt->{password}
or push @args, '(ECHOED)';
inc/My/Module/Test.pm view on Meta::CPAN
and do {
$arg{envir}
and $ENV{SPACETRACK_USER} = $spacetrack_auth; ## no critic (RequireLocalizedPunctuationVars)
return;
};
$arg{no_prompt}
and return $arg{no_prompt};
$^O eq 'VMS' and do {
warn <<'EOD';
Several tests will be skipped because you have not provided logical
name SPACETRACK_USER. This should be set to your Space Track username
inc/My/Module/Test.pm view on Meta::CPAN
};
warn <<'EOD';
Several tests require the username and password of a registered Space
Track user. Because you have not provided environment variable
SPACETRACK_USER, you will be prompted for this information. The password
will be echoed unless Term::ReadKey is installed and supports ReadMode.
If you leave either username or password blank, the tests will be
skipped.
If you set environment variable SPACETRACK_USER to your Space Track
username and password, separated by a slash ("/") character, that
username and password will be used, and you will not be prompted.
You may also supress prompts by setting the AUTOMATED_TESTING
environment variable to any value Perl takes as true. This is
equivalent to not specifying a username, and tests that require a
username will be skipped.
EOD
my $user = prompt( 'Space-Track username' )
and my $pass = prompt( { password => 1 }, 'Space-Track password' )
or do {
$ENV{SPACETRACK_USER} = '/'; ## no critic (RequireLocalizedPunctuationVars)
return NO_SPACE_TRACK_ACCOUNT;
};
$ENV{SPACETRACK_USER} = $spacetrack_auth = "$user/$pass"; ## no critic (RequireLocalizedPunctuationVars)
return;
}
}
sub spacetrack_skip_no_prompt {
my $skip;
$ENV{SPACETRACK_TEST_LIVE}
or plan skip_all => 'SPACETRACK_TEST_LIVE not set';
defined( $skip = __spacetrack_skip(
envir => 1,
no_prompt => NO_SPACE_TRACK_ACCOUNT,
)
) and plan skip_all => $skip;
return;
}
inc/My/Module/Test.pm view on Meta::CPAN
=head2 spacetrack_user
If C<$ENV{SPACETRACK_USER}> is not set, this subroutine sets it to
whatever value is obtained from the identity file if available, or by
prompting the user. The environment variable is B<not> localized.
=head2 throws_exception
is_error $st, fubar => 666,
'The exception of the beast',
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Makefile.pm view on Meta::CPAN
sub Makefile { $_[0] }
my %seen = ();
sub prompt {
shift;
# Infinite loop protection
my @c = caller();
if ( ++$seen{"$c[1]|$c[2]|$_[0]"} > 3 ) {
die "Caught an potential prompt infinite loop ($c[1]|$c[2]|$_[0])";
}
# In automated testing, always use defaults
if ( $ENV{AUTOMATED_TESTING} and ! $ENV{PERL_MM_USE_DEFAULT} ) {
local $ENV{PERL_MM_USE_DEFAULT} = 1;
goto &ExtUtils::MakeMaker::prompt;
} else {
goto &ExtUtils::MakeMaker::prompt;
}
}
sub makemaker_args {
my $self = shift;
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
use lib qw{ inc };
use My::Module::Meta;
use My::Module::Recommend;
use Config;
use ExtUtils::MakeMaker qw{WriteMakefile prompt};
use FileHandle;
use Getopt::Std;
my %opt;
getopts ('ny', \%opt) or die <<eod;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Makefile.pm view on Meta::CPAN
sub Makefile { $_[0] }
my %seen = ();
sub prompt {
shift;
# Infinite loop protection
my @c = caller();
if ( ++$seen{"$c[1]|$c[2]|$_[0]"} > 3 ) {
die "Caught an potential prompt infinite loop ($c[1]|$c[2]|$_[0])";
}
# In automated testing or non-interactive session, always use defaults
if ( ($ENV{AUTOMATED_TESTING} or -! -t STDIN) and ! $ENV{PERL_MM_USE_DEFAULT} ) {
local $ENV{PERL_MM_USE_DEFAULT} = 1;
goto &ExtUtils::MakeMaker::prompt;
} else {
goto &ExtUtils::MakeMaker::prompt;
}
}
# Store a cleaned up version of the MakeMaker version,
# since we need to behave differently in a variety of
view all matches for this distribution
view release on metacpan or search on metacpan
[@Milla]
[MetaProvides::Package]
[Substitute]
code = s/^(This document describes \S+ version |VERSION=['"])([^'"\r\n]*)/my($s,$v)=($1,$2);my%h=%Term::ReadLine::Gnu::Attribs;$s.($h{prompt}?($h{line_buffer}||$h{prompt}=~m{ \[(.*)\]})[0]:$v)/e
[GitHubREADME::Badge]
badges = travis
badges = coveralls
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Async/Redis/Subscription.pm view on Meta::CPAN
# return real messages once the driver resumes.
#
# Callback driver (exit_on_pause=1): exit cleanly on pause so the
# driver task can be restarted after reconnect without two drivers
# racing. _pause_for_reconnect wakes any in-flight _message_waiter
# via done() so this path can exit promptly.
while (!@{$self->{_pending_messages}}) {
die $self->{_fatal_error} if $self->{_fatal_error};
return undef if $self->{_closed};
return undef if $exit_on_pause && $self->{_paused};
$self->{_message_waiter} //= Future->new;
view all matches for this distribution