line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# $Id: /mirror/gungho/lib/Gungho/Handler.pm 31310 2007-11-29T13:19:42.807767Z lestrrat $ |
2
|
|
|
|
|
|
|
# |
3
|
|
|
|
|
|
|
# Copyright (c) 2007 Daisuke Maki <daisuke@endeworks.jp> |
4
|
|
|
|
|
|
|
# All rights reserved. |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
package Gungho::Handler; |
7
|
1
|
|
|
1
|
|
899
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
21
|
|
8
|
1
|
|
|
1
|
|
3
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
19
|
|
9
|
1
|
|
|
1
|
|
4
|
use base qw(Gungho::Base); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
10
|
|
10
|
1
|
|
|
1
|
|
87
|
use Gungho::Request; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
__PACKAGE__->mk_virtual_methods($_) for qw(handle_response); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub stop {} |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
1; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=head1 NAME |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
Gungho::Handler - Base Class For Gungho Handlers |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head1 SYNOPSIS |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub handle_response |
25
|
|
|
|
|
|
|
{ |
26
|
|
|
|
|
|
|
my ($self, $c, $request, $response) = @_; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 METHODS |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head2 handle_response($c, $request, response) |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
This is where you want to process the response. |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=head2 stop($reason) |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
Stop the Handler. Place code that needs to be executed to shutdown the |
38
|
|
|
|
|
|
|
handler here. |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=cut |