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 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
t/lib/Apache/test.pm view on Meta::CPAN
return 1;
}
sub _ask {
# Just a function for asking the user questions
my ($prompt, $default, $mustfind, $canskip) = @_;
my $skip = defined $canskip ? " ('$canskip' to skip)" : '';
my $response;
do {
print "$prompt [$default]$skip: ";
chomp($response = <STDIN>);
$response ||= $default;
} until (!$mustfind || ($response eq $canskip) || (-e $response || !print("$response not found\n")));
return $response;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/SWIT/Security.pm view on Meta::CPAN
Apache::SWIT::Security - security subsystem for Apache::SWIT
=head1 SYNOPSIS
# to install, from command line prompt:
Your-Module $ perl -MApache::SWIT::Security \
-e 'Apache::SWIT::Security::Maker->install_subsystem("Sec")
=head1 DISCLAIMER
view all matches for this distribution
view release on metacpan or search on metacpan
demo/ht/form.comp view on Meta::CPAN
<& /index.comp, title => $title, content => $content &>
<%init>
my $content = '';
my $prompt;
## top matter
if ($message) { $content .= "<center><h2>$message</h2></center>\n"; }
$content .= <<"ENDCONTENT";
Please enter the following information:
demo/ht/form.comp view on Meta::CPAN
<table>
ENDCONTENT
## inputs
for (@$inputs) {
$prompt = ($_->{type} eq 'hidden') ? '' : $_->{prompt};
$content .= sprintf(
'<tr><td>%s</td><td><input type="%s" name="%s" value="%s"></td></tr>',
$prompt, $_->{type}, $_->{name}, $_->{value}
);
}
## end matter
$content .= <<"ENDCONTENT";
demo/ht/form.comp view on Meta::CPAN
</%init>
<%args>
$title => 'What are you looking at?'
$action => 'http://localhost/'
$inputs => [{name => 'what', prompt => 'What?', type => 'text'}]
$message => ''
$submit => 'Say What'
</%args>
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
inc/Module/Install/Makefile.pm view on Meta::CPAN
use ExtUtils::MakeMaker ();
sub Makefile { $_[0] }
sub prompt {
shift;
goto &ExtUtils::MakeMaker::prompt;
}
sub makemaker_args {
my $self = shift;
my $args = ($self->{makemaker_args} ||= {});
view all matches for this distribution
view release on metacpan or search on metacpan
+ Added new cookpod section: "Using Apache::SessionManager with Apache::DBI"
+ Added new cookpod section: "Expiration policies on the client side"
+ Added t/lib/PerlEnvOO.pm simple mod_perl handler to test OO interface
! Updated Makefile.PL in order to:
- accept command line switch '-n' which
doesn't ask at prompt and doesn't run live Apache tests. This is to pack
easier this package for Debian (suggested by Krzysztof Krzyzaniak
<eloy@debian.org>)
- check correctly environment: test mod_perl generation
and test suite. Added messages before configuring test
- add httpd.conf extra lines for testing with Apache::DBI
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
## ----------------------------------------------------------------------------
sub GetString
{
my ($prompt, $default) = @_ ;
printf ("%s [%s]", $prompt, $default) ;
chop ($_ = <STDIN>) ;
#$_ = prompt ($prompt, $default) ;
if (!/^\s*$/)
{return $_ ;}
else
{
if ($_ eq "")
Makefile.PL view on Meta::CPAN
## ----------------------------------------------------------------------------
sub GetYesNo
{
my ($prompt, $default) = @_ ;
my ($value) ;
do
{
$value = lc (GetString ($prompt . "(y/n)", ($default?"y":"n"))) ;
}
until (($value cmp "j") == 0 || ($value cmp "y") == 0 || ($value cmp "n" ) == 0) ;
return ($value cmp "n") != 0 ;
}
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
use 5.008001;
use ExtUtils::MakeMaker;
my $tests = 't/Local/*.t';
if( ! $ENV{AUTOMATED_TESTING} ) {
if ( prompt(
"External tests require a running apache sling instance to test against!\n".
'Skip external tests?',
'y',
) =~ /^n/i ) {
$tests = 't/Local/*.t t/External/*.t';
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/TestBuild.pm view on Meta::CPAN
my $dir = $self->srcdir($version);
if ($self->{cvsroot} eq 'anon') {
$self->{cvsroot} = ':pserver:anoncvs@cvs.apache.org:/home/cvspublic';
unless (-d $dir) {
#XXX do something better than doesn't require prompt if
#we already have an entry in ~/.cvspass
#$self->cvs('login');
warning "may need to run the following command ",
"(password is 'anoncvs')";
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/Voodoo/Install/Config.pm view on Meta::CPAN
$VERSION = "3.0200";
use strict;
use warnings;
# There doesn't seem to be another "user input prompt" mechanism installed
# by default other that this one. Seems kinda strange to have to use an
# object designed for make file creation for this...oh well.
use ExtUtils::MakeMaker qw{ prompt };
use Data::Dumper;
$Data::Dumper::Indent=1;
$Data::Dumper::Terse=1;
$Data::Dumper::Sortkeys=1;
lib/Apache/Voodoo/Install/Config.pm view on Meta::CPAN
}
}
}
while (1) {
my $ans = prompt("Apache Prefix Path",$self->{PREFIX});
$ans =~ s/\/$//;
if (-e $ans && -d $ans) {
$self->{PREFIX} = $ans;
last;
lib/Apache/Voodoo/Install/Config.pm view on Meta::CPAN
unless ($self->{INSTALL_PATH}) {
$self->{INSTALL_PATH} = $self->{PREFIX} . "/sites";
}
$self->{INSTALL_PATH} = prompt("App Install Path",$self->{INSTALL_PATH});
$self->{INSTALL_PATH} =~ s/\/$//;
}
sub session_path {
my $self = shift;
unless ($self->{SESSION_PATH}) {
$self->{SESSION_PATH} = $self->{PREFIX} . "/session";
}
$self->{SESSION_PATH} = prompt("Session Path",$self->{SESSION_PATH});
$self->{SESSION_PATH} =~ s/\/$//;
}
sub conf_path {
my $self = shift;
unless ($self->{CONF_PATH}) {
$self->{CONF_PATH} = "etc";
}
$self->{CONF_PATH} = prompt("Config File Path (relative to App Install Path)",$self->{CONF_PATH});
$self->{CONF_PATH} =~ s/\/$//;
}
sub conf_file {
my $self = shift;
unless ($self->{CONF_FILE}) {
$self->{CONF_FILE} = "etc/voodoo.conf";
}
$self->{CONF_FILE} = prompt("Config File Name (relative to App Install Path)",$self->{CONF_FILE});
$self->{CONF_FILE} =~ s/\/$//;
}
sub updates_path {
my $self = shift;
unless ($self->{UPDATES_PATH}) {
$self->{UPDATES_PATH} = "etc/updates";
}
$self->{UPDATES_PATH} = prompt("Update File Path (relative to App Install Path)",$self->{UPDATES_PATH});
$self->{UPDATES_PATH} =~ s/\/$//;
}
sub tmpl_path {
my $self = shift;
unless ($self->{TMPL_PATH}) {
$self->{TMPL_PATH} = "html";
}
$self->{TMPL_PATH} = prompt("Template File Path (relative to App Install Path)",$self->{TMPL_PATH});
$self->{TMPL_PATH} =~ s/\/$//;
}
sub code_path {
my $self = shift;
unless ($self->{CODE_PATH}) {
$self->{CODE_PATH} = "code";
}
$self->{CODE_PATH} = prompt("Perl Module Path (relative to App Install Path)",$self->{CODE_PATH});
$self->{CODE_PATH} =~ s/\/$//;
}
sub apache_uid {
my $self = shift;
lib/Apache/Voodoo/Install/Config.pm view on Meta::CPAN
my $d = (getpwuid($self->{APACHE_UID}))[0];
$default = $d if ($d);
}
while (1) {
my $apache = prompt("User that Apache runs as",$default);
my (undef,undef,$uid,undef) = getpwnam($apache);
if ($uid =~ /^\d+$/) {
$self->{'APACHE_UID'} = $uid;
last;
}
lib/Apache/Voodoo/Install/Config.pm view on Meta::CPAN
my $d = (getgrgid($self->{APACHE_GID}))[0];
$default = $d if ($d);
}
while (1) {
my $apache = prompt("Group that Apache runs as",$default);
my (undef,undef,undef,$gid) = getpwnam($apache);
if ($gid =~ /^\d+$/) {
$self->{'APACHE_GID'} = $gid;
last;
}
lib/Apache/Voodoo/Install/Config.pm view on Meta::CPAN
unless ($self->{DEBUG_DBD}) {
$self->{DEBUG_DBD} = ['dbi:SQLite:dbname=/tmp/apachevoodoo.db','',''];
}
$self->{DEBUG_DBD}->[0] = prompt("Debug Database Connect", $self->{DEBUG_DBD}->[0]);
$self->{DEBUG_DBD}->[1] = prompt("Debug Database Username",$self->{DEBUG_DBD}->[1]);
$self->{DEBUG_DBD}->[2] = prompt("Debug Database Password",$self->{DEBUG_DBD}->[2]);
}
sub debug_path {
my $self = shift;
unless ($self->{DEBUG_PATH}) {
$self->{DEBUG_PATH} = "/debug";
}
$self->{DEBUG_PATH} = prompt("URL Path to the debug handler",$self->{DEBUG_PATH});
}
1;
################################################################################
view all matches for this distribution
view release on metacpan or search on metacpan
Wyrd/Site/Page.pm view on Meta::CPAN
Examine the allow/deny state of the page and determine whether the user has the
clearance to view the page. These interact with Apache::Wyrd::User-derived
objects using the Apache::Wyrd::Services::Auth conventions to determine the
user's current authorization levels. If the page is forbidden to the public, it
will use the dir_config value "UnauthURL" to direct them to an "unauthorized
page", presumably to be prompted to log in, or failing the existence of that,
simply return an error message.
=cut
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 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
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
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
Once you have installed this package, you may have to run "Build.PL"
again. If you are installing from CPAN, you may need to quit and
re-enter your CPAN shell.
EOT
$build->prompt("Press enter to continue", ".");
} else {
$build = Apache::TestMB->new(%opts);
}
print qq{Example DSN: "DBI:mysql:database=test"\n};
if($build->notes(DBI_DSN => $build->prompt(
"What DSN should we use for database tests? (Enter '0' to skip DB tests)",
exists $ENV{DBI_DSN} ? $ENV{DBI_DSN} : 0
))) {
$build->notes(DBI_USER => $build->prompt(
"Username for the database connection:", $ENV{DBI_USER}
));
$build->notes(DBI_PASS => $build->prompt(
"Password for the database connection:", $ENV{DBI_PASS}
));
} else {
$build->notes(DBI_USER => undef);
$build->notes(DBI_PASS => undef);
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
$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
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
AuthNetLDAP.pm view on Meta::CPAN
require valid-user
PerlAuthenHandler Apache2::AuthNetLDAP
If you don't have mod_perl or Net::LDAP installed on your system, then the Makefile will prompt you to
install each of these modules. At this time, March 8, 2004, you may say yes to Net::LDAP, and yes for
mod_perl, if you are installing this module on apache 1.3. (The reason being, that mod_perl 2 is under
development, and is not ready for download from CPAN at this time. Therefore, your install of mod_perl,
as initiated with the Makefile.PL, will fail. If you are going to install mod_perl 2, which is needed
to work with Apache2, you will need to download it from: http://perl.apache.org/download/index.html.
AuthNetLDAP.pm view on Meta::CPAN
http://perl.apache.org/docs/2.0/user/install/install.html#Installing_mod_perl_from_Source.)
Otherwise installation is the same.
You may also notice that the Makefile.PL will ask you to install ExtUtils::AutoInstall. This is
necessary for the installation process to automatically install any of the dependencies that you
are prompted for. You may choose to install the module, or not.
=head1 HOMEPAGE
Module Home: http://search.cpan.org/author/SPEEVES/
view all matches for this distribution
view release on metacpan or search on metacpan
my $username = shift;
die "Invalid username\n" unless $username =~ USER_REGEX;
($username) = ($username =~ /(.*)/s);
my $passwd = prompt 'Enter new Apache2::Authen::Passphrase password: ';
my $confirm = prompt 'Retype new Apache2::Authen::Passphrase password: ';
die "Sorry, passwords do not match\n" unless $passwd eq $confirm;
pwset $username, $passwd;
say 'Password updated successfully'; ## no critic (RequireCheckedSyscalls)
view all matches for this distribution
view release on metacpan or search on metacpan
Auth/Auth.pm view on Meta::CPAN
=head1 DESCRIPTION
This module allows authentication against a SecurID server. A request
is redirected to this handler if the authentication cookie does not
exist or is no longer valid. The handler will prompt for username and
passcode. It will then construct and encrypt a UDP packet and send it to
the Ace request daemon. This is necessary since libsdiclient.a needs to
persist for NEXT TOKEN MODE and SET PIN MODE. If the authentication is
valid an encrypted Authentication Cookie is set and the request is redirected
to the originating URI. If the user needs to enter NEXT TOKEN or set their
PIN they will be prompted to do so and if valid the request is then redirected
to the originating URI.
=head1 LIST OF TOKENS
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
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( _version_of($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
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
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
FileManager.pm view on Meta::CPAN
var f=window.document.FileManager;
if (get_num_checked() != 1) {
window.alert('Please select ONE file to rename by clicking on a '+
'check box with the mouse.');
} else {
var rv=window.prompt('enter new name','');
if ((rv != null) && (rv != '')) {
f.FILEMANAGER_cmd.value='rename';
f.FILEMANAGER_arg.value=rv;
f.submit();
}
FileManager.pm view on Meta::CPAN
><FONT COLOR=WHITE><B>extract</B></FONT></A>",
#New File
"<A HREF=# onclick=\"
var f=window.document.FileManager;
var rv = window.prompt('new file name','');
var cd = f.FILEMANAGER_curr_dir.value;
if (cd != '') {
rv = cd+'/'+rv;
}
if ((rv != null) && (rv != '')) {
FileManager.pm view on Meta::CPAN
<FONT COLOR=WHITE><B>new file</B></FONT></A>",
#New Directory
"<A HREF=# onclick=\"
var f=window.document.FileManager;
var rv=window.prompt('new directory name','');
if ((rv != null) && (rv != '')) {
f.FILEMANAGER_arg.value=rv;
f.FILEMANAGER_cmd.value='mkdir';
f.submit();
view all matches for this distribution