Apache2-Controller

 view release on metacpan or  search on metacpan

t/lib/Apache2/Controller/Test/OpenIDServer.pm  view on Meta::CPAN

    HTTP::Server::Simple::CGI
);

use Net::OpenID::Server;

# try overriding signal handlers
$HTTP::Server::Simple::SIG{ALRM} = sub { 
    my @args = @_;
  # warn "# received timeout alarm, temminating $$\n";
  # warn "# args are (".join(',',@args).")\n";
  # warn "# (caller is ".caller().")\n";
  # die "# terminating on alarm\n";
    exit(0);
};

$HTTP::Server::Simple::SIG{INT} = sub { 
    warn "# caught interrupt, exiting $$ cleanly\n";
    exit(0);
};

use Apache::TestServer;

t/lib/Apache2/Controller/Test/OpenIDServer.pm  view on Meta::CPAN

    my $server = HTTP::Server::Simple::CGI->new($port);
    bless $server, $class;

    return $server;
}

# we overload run so we can set the appropriate alarm to die
sub run {
    my ($self, @args) = @_;
  # warn "# setting alarm in pid $$ for 45 seconds...\n";
  # warn "# caller is ".caller()."\n";
    alarm(45);
  # warn "# calling super run\n";
    return $self->HTTP::Server::Simple::run(@args);
}

# overload print_banner so it doesn't do anything
sub print_banner {
}

sub handle_request {



( run in 0.352 second using v1.01-cache-2.11-cpan-b61123c0432 )