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
Makefile.PL view on Meta::CPAN
unless (eval "use Module::Build::Compat 0.02; 1" ) {
print "This module requires Module::Build to install itself.\n";
require ExtUtils::MakeMaker;
my $yn = ExtUtils::MakeMaker::prompt
(' Install Module::Build now from CPAN?', 'y');
unless ($yn =~ /^y/i) {
die " *** Cannot install without Module::Build. Exiting ...\n";
}
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
unless (eval "use Module::Build::Compat 0.02; 1" ) {
print "This module requires Module::Build to install itself.\n";
require ExtUtils::MakeMaker;
my $yn = ExtUtils::MakeMaker::prompt
(' Install Module::Build from CPAN?', 'y');
if ($yn =~ /^y/i) {
require Cwd;
require File::Spec;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Alzabo/GUI/Mason/Build.pm view on Meta::CPAN
return if ( exists $self->{Alzabo}{uid} &&
exists $self->{Alzabo}{gid} );
$self->{Alzabo}{user} =
$self->prompt( <<'EOF',
What user would you like to own the directories and files used for the
Mason components as well as the components themselves?
EOF
$self->_possible_web_user );
$self->{Alzabo}{group} =
$self->prompt( <<'EOF',
What group would you like to own the directories and files used for
the Mason components as well as the components themselves?
EOF
$self->_possible_web_group );
view all matches for this distribution
view release on metacpan or search on metacpan
eg/convert.pl view on Meta::CPAN
#!/usr/bin/perl -w
use strict;
use Alzabo::Create;
use ExtUtils::MakeMaker qw(prompt);
use Getopt::Long;
my $V = $Alzabo::VERSION;
use vars qw($name);
eg/convert.pl view on Meta::CPAN
}
sub save_schema
{
my $s_name = shift;
my $file = prompt( "File to which schema should be written?", "${s_name}_schema.pl" );
local *S;
open S, ">$file" or die "Cannot open file '$file': $!\n";
unless ( print S (join "\n", @eval) ) { die "Cannot write to file '$file': $!\n"; }
close S or die "Cannot close file '$file': $!\n";
view all matches for this distribution
view release on metacpan or search on metacpan
share/Templates/Templates/XSLT+DOJO/authorize.xsl view on Meta::CPAN
<td>Username</td>
<td>
<xsl:variable name="value">,value:"<xsl:value-of select="./SysUser/@login"/>"</xsl:variable>
<input data-dojo-type="dijit.form.ValidationTextBox">
<xsl:attribute name="data-dojo-props">
<xsl:value-of select="concat('id:"id_Login",name:"login",type:"text",trim:true,maxLength:"32",promptMessage:"Login"',$value)"/>
</xsl:attribute>
</input>
</td>
</tr>
<tr>
<td>Password</td>
<td>
<xsl:variable name="value">,value:"<xsl:value-of select="./SysUser/@pswd"/>"</xsl:variable>
<input data-dojo-type="dijit.form.ValidationTextBox">
<xsl:attribute name="data-dojo-props">
<xsl:value-of select="concat('id:"id_Password",name:"password",type:"password",trim:true,maxLength:"32",promptMessage:"Password"',$value)"/>
</xsl:attribute>
</input>
</td>
</tr>
</table>
view all matches for this distribution
view release on metacpan or search on metacpan
Amethyst/Connection/Anarres.pm view on Meta::CPAN
sub handler_login {
my ($kernel, $session, $heap) = @_[KERNEL, SESSION, HEAP];
$kernel->yield('write', $heap->{Args}->{Login}, $heap->{Args}->{Password});
# $kernel->yield('write', 'set PS1=', 'set TERM=none');
$kernel->yield('write', 'config', 'if', 'prompt', 'mp off', 'q');
$kernel->yield('write', 'channel -1 all');
$kernel->yield('write', '');
}
sub handler_logout {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Amon2/Auth/Site/Google.pm view on Meta::CPAN
client_id => $self->client_id,
scope => $self->scope,
redirect_uri => $callback_uri,
response_type => 'code',
access_type => 'offline',
approval_prompt => 'force',
});
return $uri->as_string;
}
sub callback {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Amon2/Auth/Site/LINE.pm view on Meta::CPAN
has nonce => (
is => 'ro',
isa => 'Str',
);
has prompt => (
is => 'ro',
isa => 'Str',
);
has max_age => (
lib/Amon2/Auth/Site/LINE.pm view on Meta::CPAN
has ui_locales => (
is => 'ro',
isa => 'Str',
);
has bot_prompt => (
is => 'ro',
isa => 'Str',
);
has user_info => (
lib/Amon2/Auth/Site/LINE.pm view on Meta::CPAN
);
# optional parameters
$params{nonce} = $self->get_nonce($c);
for my $key (qw(prompt max_age ui_locales bot_prompt)) {
my $value = $self->$key;
if (defined $value) {
$params{$key} = $value;
}
}
lib/Amon2/Auth/Site/LINE.pm view on Meta::CPAN
=item nonce
Optional. If you don't set nothing, it generates a random string.
The C<< nonce >> parameter is used a system for preventing replay attack / token interception attack on OpenID Connect. This attribute should not be set some foreseeable fixed value.
=item prompt
Optional. C<< consent >> is acceptable.
=item max_age
lib/Amon2/Auth/Site/LINE.pm view on Meta::CPAN
=item ui_locales
Optional. Specified on OpenID Conjnect Core 1.0.
=item bot_prompt
Optional. C<< normal >> and C<< aggressive >> are acceptable.
=item state_session_key
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
xt/06_dependencies.t view on Meta::CPAN
use File::Which;
use File::Temp qw(tempdir);
plan skip_all => "No cpanm" unless which('cpanm');
local $ENV{PERL_CPANM_OPT} = '--no-man-pages --no-prompt --no-interactive';
my $tmp = tempdir(CLEANUP => 1);
is(system("cpanm --notest -l $tmp ."), 0);
for (qw(Amon2::Lite Amon2::Auth Amon2::DBI Amon2::MobileJP Amon2::Plugin::L10N)) {
is(system("cpanm -l $tmp --reinstall $_"), 0, $_);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Anki/Import.pm view on Meta::CPAN
have Perl installed on your system. MacOS and *nix machines will have
Perl already installed but the Windows operating system does not
come pre-installed with Perl and so you may have to install it first before you
can use C<Anki::Import>.
If you are unsure if you have Perl installed, open a command prompt and type in:
perl -v
If Perl is installed, it will report the version of Perl on your machine and
other information. If Perl is not installed, you will get a "not recognized"
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
t/ansible-test1/ansible.cfg view on Meta::CPAN
# disable the Paramiko look for keys function
#look_for_keys = False
# When using persistent connections with Paramiko, the connection runs in a
# background process. If the host doesn't already have a valid SSH key, by
# default Ansible will prompt to add the host key. This will cause connections
# running in background processes to fail. Uncomment this line to have
# Paramiko automatically add host keys.
#host_key_auto_add = True
[ssh_connection]
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Ante/Deluvian/Dialog.pm view on Meta::CPAN
$self->{'vcenter'} = 40;
$self->{'recary'} = [];
$self->{'parind'} = $param{parindent} || 2;
$self->{'title'} = $param{title} || undef;
$self->{'header'} = $param{header} || " ";
$self->{'prompt'} = $param{prompt} || ":";
$self->{'platform'} = $param{platform} || "UNIX";
$_isWin = $param{platform} eq "MSWIN";
$_doRec = $param{record} || FALSE;
$_fhInp = $param{inpfile} || undef;
if ((exists($param{replay})) && (-s $param{replay})) {
lib/Ante/Deluvian/Dialog.pm view on Meta::CPAN
if (defined($self->{'header'})) {
$self->{'usable'}--;
$self->{'stat'}++;
$self->{'from'}++;
}
if (defined($self->{'prompt'})) {
$self->{'usable'}--;
}
$self->{'hcenter'} = int ($self->{'cols'} / 2);
$self->{'vcenter'} = int (($self->{'usable'} - $self->{'from'}) / 2);
$self->{'lines'} = $self->_drawframe();
lib/Ante/Deluvian/Dialog.pm view on Meta::CPAN
my $self = shift;
my $rows = $self->{'rows'} - 1;
my $cols = $self->{'cols'} - 2;
my ($line, @lines, $inp);
if (defined($self->{'prompt'})) {
$rows--;
}
for my $i (0 .. $rows) {
if (($i == 0) || ($i == $rows)) {
push @lines, "+" . "-" x $cols . "+";
lib/Ante/Deluvian/Dialog.pm view on Meta::CPAN
}
}
if (defined($self->{'title'})) {
_formatline(\$lines[0], $self->{'title'}, "C");
}
if (defined($self->{'prompt'})) {
push @lines, "$self->{'prompt'} ";
}
return [ @lines ];
}
#------------------------------------------------------------------
lib/Ante/Deluvian/Dialog.pm view on Meta::CPAN
push @drvlst, "$drv/ Local directory";
}
}
}
@drvlst = sort(@drvlst);
$drv = $self->listbox(\@drvlst, select => "atonce", prompt => "Please select a drive or partition:");
if ($_isWin && ($drv =~ /\A([A-Z]:\/)\s+/)) {
$drv = $1;
}
elsif ($drv =~ /\A(\/\S*)/) {
$drv = $1;
lib/Ante/Deluvian/Dialog.pm view on Meta::CPAN
#------------------------------------------------------------------
sub printscreen {
#------------------------------------------------------------------
my $self = shift;
my $rlines = shift;
my (@lines, $prompt);
if (defined($rlines)) {
@lines = @$rlines;
}
else {
@lines = @{$self->{'lines'}};
}
if (defined($self->{'prompt'})) {
$prompt = pop(@lines);
}
foreach my $line (@lines) {
print "$line" . $self->{'eoln'};
}
if (defined($prompt)) {
print "$prompt ";
}
}
#------------------------------------------------------------------
sub _getinput {
lib/Ante/Deluvian/Dialog.pm view on Meta::CPAN
@lines = @$rLines;
}
else {
@lines = @{$self->{'lines'}};
}
if (defined($self->{'prompt'})) {
$lines[-1] = $rAlert->[0];
}
$beg = $self->{'vcenter'} - int(($#$rAlert - 1) / 2);
for $i (1 .. $#$rAlert) {
_formatline(\$lines[$beg + $i - 1], $rAlert->[$i], "C");
lib/Ante/Deluvian/Dialog.pm view on Meta::CPAN
@lines = @$rLines;
}
else {
@lines = @{$self->{'lines'}};
}
if ((exists($param{'prompt'})) && (defined($self->{'prompt'}))) {
$lines[-1] = $param{'prompt'};
}
$len = length($nelm);
$nopg = int($nelm / $self->{'usable'});
if ($nelm % $self->{'usable'} > 0) { $nopg++; };
print "List contains $nelm elements and will result in $nopg pages ...\n";
lib/Ante/Deluvian/Dialog.pm view on Meta::CPAN
@lines = @$rLines;
}
else {
@lines = @{$self->{'lines'}};
}
if (defined($self->{'prompt'})) {
$lines[-1] = $hmodes{$fmode}[1];
}
if ((!defined($start)) || ($start eq "")) {
$start = $self->_getDrives();
}
lib/Ante/Deluvian/Dialog.pm view on Meta::CPAN
$d = Ante::Deluvian::Dialog->new(
platform => "MSWIN",
drawframe => 1,
title => "Title of Window",
prompt => "Please make your choice:",
# record => 1,
# replay => "C:/temp/addialog/<username>_<pid>.txt",
);
$fdir = $d->dselect();
lib/Ante/Deluvian/Dialog.pm view on Meta::CPAN
=head1 CONSTRUCTOR
=over 4
=item new (platform => "MSWIN", title => "Window's title", prompt => "What do you want");
There are two other options C<record>, which can be set to a boolean value, and C<replay>, which
expects to get some previously recorded input file. This is mainly for testing purposes, if you
don't like to repeat a special input sequence by hand... I'm sure you will find out if this is
interesting to you.
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
Makefile.PL view on Meta::CPAN
unless (eval "use Module::Build::Compat 0.02; 1" ) {
print "This module requires Module::Build to install itself.\n";
require ExtUtils::MakeMaker;
my $yn = ExtUtils::MakeMaker::prompt
(' Install Module::Build now from CPAN?', 'y');
unless ($yn =~ /^y/i) {
die " *** Cannot install without Module::Build. Exiting ...\n";
}
view all matches for this distribution
view release on metacpan or search on metacpan
print $table->{1}->{phrase}.
WHERE CAN I GET MORE INFO?
After installing the module, type "perldoc AnyData" at
the command prompt, or just read the documentation at
the bottom of the AnyData.pm file.
WHO DUNNIT?
Jeff Zucker <jeff@vpservices.com>
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, 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/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
$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 || $InstallDepsTarget;
inc/Module/AutoInstall.pm view on Meta::CPAN
and (
$CheckOnly
or ($mandatory and $UnderCPAN)
or $AllDeps
or $InstallDepsTarget
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
debian/rules view on Meta::CPAN
# be used freely wherever it is useful.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# If set to a true value then MakeMaker's prompt function will
# always return the default without waiting for user input.
export PERL_MM_USE_DEFAULT=1
PERL ?= /usr/bin/perl
PACKAGE = $(shell dh_listpackages)
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/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/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, 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
[@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