line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
package ASP4::FormHandler; |
3
|
|
|
|
|
|
|
|
4
|
2
|
|
|
2
|
|
1030
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
62
|
|
5
|
2
|
|
|
2
|
|
7
|
use warnings 'all'; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
75
|
|
6
|
2
|
|
|
2
|
|
8
|
use base 'ASP4::HTTPHandler'; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
157
|
|
7
|
2
|
|
|
2
|
|
10
|
use vars __PACKAGE__->VARS; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
11
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
1;# return true: |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=pod |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=head1 NAME |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
ASP4::FormHandler - Base class for all form handlers |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=head1 SYNOPSIS |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
package my::handler; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
use strict; |
22
|
|
|
|
|
|
|
use warnings 'all'; |
23
|
|
|
|
|
|
|
use base 'ASP4::FormHandler'; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
# Import $Request, $Response, $Session, $Server, $Form, $Config, $Stash |
26
|
|
|
|
|
|
|
use vars __PACKAGE__->VARS; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub run { |
29
|
|
|
|
|
|
|
my ($self, $context) = @_; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
$Response->Write("Hello, World!"); |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
1;# return true: |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head1 DESCRIPTION |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
All ASP4 *.asp scripts and C classes should inherit from C. |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head1 PROPERTIES |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head2 VARS |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
Returns the list of variable names of the ASP4 intrinsic objects. |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
$Request $Response |
47
|
|
|
|
|
|
|
$Session $Server |
48
|
|
|
|
|
|
|
$Config $Form |
49
|
|
|
|
|
|
|
$Stash |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head1 METHODS |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head2 before_run( $self, $context ) |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
Called before C - can be used to deny access or redirect elsewhere under |
56
|
|
|
|
|
|
|
special conditions. |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head2 run( $self, $context ) |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
Where most of your action is expected to occur. |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head2 after_run( $self, $context ) |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
Called after C, can be used |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=cut |
67
|
|
|
|
|
|
|
|