Salve a tutti, c'è qualche volenteroso che è in grado di spiegarmi che cosa fa esattamente questo script?
codice:
use lib '../lib/';
use NoCat qw( ANONYMOUS );
use strict;
my $authserv = NoCat->auth_service( ConfigFile => $ENV{NOCAT} );
my $cgi = $authserv->cgi;
my $params = $cgi->Vars;
# Debug configuration setup.
$authserv->check_config(qw(
LoginForm FatalForm RenewForm LoginOKForm ExpiredForm
LoginGreeting LoginMissing LoginBadUser LoginBadPass
));
$authserv->log( 7, sprintf( "User %s from %s requests %s",
$params->{user} || "UNKNOWN", $cgi->remote_host,
lc( $params->{mode} ) || "form" )
);
# Figure out which image button was clicked (since they don't have value="" attributes).
if (my ($button) = grep { defined $params->{"mode_$_.x"} } qw( login skip logout )) {
delete $params->{$_} for ( "mode_$button.x", "mode_$button.y" );
$params->{mode} = $button;
}
# Have we filled in the form yet? No? If not, present one.
$authserv->display( LoginForm => "LoginGreeting" ) unless $params->{mode};