PageRenderTime 28ms CodeModel.GetById 15ms app.highlight 9ms RepoModel.GetById 1ms app.codeStats 1ms

/t/response/TestModPerl/Basic.pm

http://github.com/http-engine/HTTP-Engine
Perl | 32 lines | 26 code | 6 blank | 0 comment | 0 complexity | 44f11261dc2d67021b7644d1d0287ebd MD5 | raw file
 1package TestModPerl::Basic;
 2use strict;
 3use base qw(HTTP::Engine::Interface::ModPerl);
 4use Apache::Test;
 5
 6sub handler : method
 7{
 8    my ($class, $r) = @_;
 9
10    plan($r, tests => 1);
11
12    my $res = $class->SUPER::handler($r);
13    ok(1);
14    return $res;
15}
16
17sub create_engine {
18    my ( $class, $r ) = @_;
19
20    HTTP::Engine->new(
21        interface => HTTP::Engine::Interface::ModPerl->new(
22            request_handler => sub {
23                my $req = shift;
24                HTTP::Engine::Response->new(
25                    status => 200,
26                )
27            },
28        )
29    );
30}
31
321;