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/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
print <<EOF
You can repeat this test, after adding some accounts with different
authorization levels. Try e.g.:
- Installing with an account without 'admin' rights.
- Logging in with an invalid account (login will prompt you max. 3 times).
- Enter false data while changing the password.
- Change passwords from the admin menu.
- Change rights from the admin menu.
- Delete all accounts.
- Change rights of all accounts until and including the last admin account.
view all matches for this distribution
view release on metacpan or search on metacpan
Aut/UI/Console.pm view on Meta::CPAN
=head3 C<ask_pass(aut:Aut, msg:string [,any]) --E<gt> string>
=over 1
This function displays message 'msg', displays a appropriate prompt and
asks the user to input his/hers password.
Returns the password that has been entered, or C<undef>, if an empty
password has been given.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AuthCAS.pm view on Meta::CPAN
=pod
=head2 getServerLoginGatewayURL($service)
Returns non-blocking login URL
ie: if user is logged in, return the ticket, otherwise do not prompt for login
=cut
sub getServerLoginGatewayURL {
my $self = shift;
view all matches for this distribution
view release on metacpan or search on metacpan
run the tests with has privilege to write to the /var/ace directory.
Because the interactive nature of SecurID requires you to enter a
time-sensitive token from a card, you cannot automate the test suite.
An ACE server will never accept the same token twice, so during the
testing, you will often be prompted to wait for the token on the card
to change before continuing with the test.
Finally, if you don't have the Term::ReadKey module installed, the PIN
changing test will display a new PIN in plain text on the screen. You
should use appropriate caution when doing this, and may want to change
view all matches for this distribution
view release on metacpan or search on metacpan
=head1 SYNOPSIS
use Authen::ACE4;
AceInitialize();
($result, $handle, $moreData, $echoFlag, $respTimeout,
$nextRespLen, $prompt)
= AceStartAuth($username);
($result, $moreData, $echoFlag, $respTimeout,
$nextRespLen, $prompt)
= Authen::ACE4::AceContinueAuth($handle, $resp);
($result, $status)
= Authen::ACE4::AceGetAuthenticationStatus($handle);
$result = AceCloseAuth($handle);
before calling AceInitialize.
=item AceStartAuth
($result, $handle, $moreData, $echoFlag, $respTimeout,
$nextRespLen, $prompt)
= Authen::ACE4::AceStartAuth($username);
The AceStartAuth function is designed to be used aling with
AceContinueAuth and AceCloseAuth.
Indicates the success or failure of the call (but not success
of the authentication, see AceGetAuthenticationStatus for that).
If the call succeeds, $handle, $moreData etc will be set. If
the call fails, only $result and $prompt will have meaningful values.
Possible results for $result are
=over 4
A flag that gives a hint to the developer whether the next response
should be echoed on the screen.
=item respTimeout
A hint to the developer about how long to display this prompt
string to the user.
=item nextRespLen
Indicates the maximum number of bytes of data expected in the next
call to AceContinueAuth
=item prompt
Message string that should be shown to the user as the request for
data to be passed to the next call to AceContinueAuth.
=back
=item AceContinueAuth
($result, $moreData, $echoFlag, $respTimeout,
$nextRespLen, $prompt)
= Authen::ACE4::AceContinueAuth($handle, $resp);
AceContinueAuth should continue to be called for as long as
it succeeds and $moreData is true. Each successive call will
The opaque handle for this authentication context, previously returned
by AceStartAuth.
=item resp
The response from the user to the prompt from the previous AceStartAuth
or AceContinueAuth.
=back
Returned data is
Indicates the success or failure of the call (but not success
of the authentication, see AceGetAuthenticationStatus for that).
If the call succeeds, $moreData, $echoFlag etc will be set. If
the call fails, only $result and $prompt will have meaningful values.
Possible results for $result are
=over 4
A flag that gives a hint to the developer whether the next response
should be echoed on the screen.
=item respTimeout
A hint to the developer about how long to display this prompt
string to the user.
=item nextRespLen
Indicates the maximum number of bytes of data expected in the next
call to AceContinueAuth
=item prompt
Message string that should be shown to the user as the request for
data to be passed to the next call to AceContinueAuth.
=back
view all matches for this distribution