line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Apache2::Controller::NonResponseRequest; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=head1 NAME |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
Apache2::Controller::NonResponseRequest - internal base class w/ apreq for |
6
|
|
|
|
|
|
|
non-response handlers in Apache2::Controller framework |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
=head1 VERSION |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
Version 1.001.001 |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=cut |
13
|
|
|
|
|
|
|
|
14
|
1
|
|
|
1
|
|
2110
|
use version; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
15
|
|
|
|
|
|
|
our $VERSION = version->new('1.001.001'); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=head1 SYNOPSIS |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
This is an INTERNAL base class and you don't need to use it. |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
package Apache2::Controller; |
22
|
|
|
|
|
|
|
use base Apache2::Controller::NonResponseRequest; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
# no need to define handler() or new() |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
1; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head1 DESCRIPTION |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
This is like L except |
31
|
|
|
|
|
|
|
that it creates the L object and makes C<< $self >> |
32
|
|
|
|
|
|
|
an inheriting subclass of it. So using this as a base, there is |
33
|
|
|
|
|
|
|
no need to dereference C<< $self->{r} >> to get at the request. |
34
|
|
|
|
|
|
|
It is all C<< $self >> just like within L |
35
|
|
|
|
|
|
|
controller modules. |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
You should not use this module for anything that you're doing. |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 METHODS |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=cut |
42
|
|
|
|
|
|
|
|
43
|
1
|
|
|
1
|
|
80
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
29
|
|
44
|
1
|
|
|
1
|
|
6
|
use warnings FATAL => 'all'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
53
|
|
45
|
1
|
|
|
1
|
|
5
|
use English '-no_match_vars'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
7
|
|
46
|
|
|
|
|
|
|
|
47
|
1
|
|
|
|
|
85
|
use base qw( |
48
|
|
|
|
|
|
|
Apache2::Controller::NonResponseBase |
49
|
|
|
|
|
|
|
Apache2::Controller::Methods |
50
|
|
|
|
|
|
|
Apache2::Request |
51
|
1
|
|
|
1
|
|
469
|
); |
|
1
|
|
|
|
|
2
|
|
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
use Log::Log4perl qw(:easy); |
54
|
|
|
|
|
|
|
use YAML::Syck; |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
use Apache2::RequestRec (); |
57
|
|
|
|
|
|
|
use Apache2::RequestUtil (); |
58
|
|
|
|
|
|
|
use Apache2::Log; |
59
|
|
|
|
|
|
|
use Apache2::URI; |
60
|
|
|
|
|
|
|
use Apache2::Const -compile => qw( :common :http :methods ); |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
use Apache2::Controller::X; |
63
|
|
|
|
|
|
|
use Apache2::Controller::Const qw( @RANDCHARS $NOT_GOOD_CHARS ); |
64
|
|
|
|
|
|
|
use Apache2::Controller::Funk qw( log_bad_request_reason ); |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head2 new |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
C creates an object of the child class using |
69
|
|
|
|
|
|
|
L and then assigns the |
70
|
|
|
|
|
|
|
C<< Apache2::Request >> object to C<< $self->{r} >>. |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=cut |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
sub new { |
75
|
|
|
|
|
|
|
my ($class, $r) = @_; |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
# note the '::' in call to new, not '->' ... we have to trick the class |
78
|
|
|
|
|
|
|
my $self = Apache2::Controller::NonResponseBase::new($class, $r); |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
$class = $self->{class}; |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
DEBUG("Created NonResponseBase of class '$class'"); |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
$self->{r} = Apache2::Request->new( $self->{r},); |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
DEBUG("Replaced self->{r} with Apache2::Request object"); |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
return $self; |
89
|
|
|
|
|
|
|
} |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
1; |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=head1 SEE ALSO |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
L |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
L |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
L |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
L (uses this as base) |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
L |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=head1 AUTHOR |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
Mark Hedges, C<< >> |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
Copyright 2008-2010 Mark Hedges, all rights reserved. |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
114
|
|
|
|
|
|
|
under the same terms as Perl itself. |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
This software is provided as-is, with no warranty |
117
|
|
|
|
|
|
|
and no guarantee of fitness |
118
|
|
|
|
|
|
|
for any particular purpose. |
119
|
|
|
|
|
|
|
|