line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CAS::Apache::AdminForms; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
1410
|
use warnings FATAL => 'all', NONFATAL => 'redefine'; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
41
|
|
4
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
65
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
=head1 NAME |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
CAS::Apache::AdminForms - The great new CAS::Apache::UserForms! |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 VERSION |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
Version 0.01 |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=cut |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
17
|
1
|
|
|
1
|
|
467
|
use Apache2::Const qw(OK SERVER_ERROR REDIRECT); |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
use base qw(CAS::Apache); |
19
|
|
|
|
|
|
|
use CAS::Apache::Auth (); |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head1 SYNOPSIS |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
Quick summary of what the module does. |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
Perhaps a little code snippet. |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
use CAS::Apache::UserForms; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
my $foo = CAS::Apache::UserForms->new(); |
30
|
|
|
|
|
|
|
... |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head1 EXPORT |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
A list of functions that can be exported. You can delete this section |
35
|
|
|
|
|
|
|
if you don't export anything, such as for a purely object-oriented module. |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head1 FUNCTIONS |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head2 function1 |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=cut |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub handler { |
45
|
|
|
|
|
|
|
my $apache2 = shift; |
46
|
|
|
|
|
|
|
die unless ref $apache2; |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
my $request = $apache2->uri(); |
49
|
|
|
|
|
|
|
die unless $request; |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
$request =~ m{/(\w+)$}; |
52
|
|
|
|
|
|
|
my $page = $1; |
53
|
|
|
|
|
|
|
unless ($page) { |
54
|
|
|
|
|
|
|
die "Unable to determine page requested in $request"; |
55
|
|
|
|
|
|
|
} # unless it's a CAS page |
56
|
|
|
|
|
|
|
my $CR_gen_response = \&{$page}; |
57
|
|
|
|
|
|
|
unless (defined &$CR_gen_response) { |
58
|
|
|
|
|
|
|
die "$page is not available through __PACKAGE__"; |
59
|
|
|
|
|
|
|
} # see if method is defined in this namespace |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
# $apache2->unparsed_uri to find args |
62
|
|
|
|
|
|
|
$apache2->content_type('text/html'); |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
my ($status, $html) = &$CR_gen_response($apache2); |
65
|
|
|
|
|
|
|
return $status unless $status == OK; |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
print $html; |
68
|
|
|
|
|
|
|
# warn "HTML printed\n"; |
69
|
|
|
|
|
|
|
return OK; |
70
|
|
|
|
|
|
|
} # handler |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
sub users { |
74
|
|
|
|
|
|
|
my $apache2 = shift; |
75
|
|
|
|
|
|
|
my $cgi = CGI->new; |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
my $html = $cgi->start_html("Foo"); |
78
|
|
|
|
|
|
|
$html .= <
|
79
|
|
|
|
|
|
|
Bar |
80
|
|
|
|
|
|
|
HTML |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
$html .= $cgi->end_html; |
83
|
|
|
|
|
|
|
return (OK, $html); |
84
|
|
|
|
|
|
|
} # users |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
sub add_client { |
88
|
|
|
|
|
|
|
my $apache2 = shift; |
89
|
|
|
|
|
|
|
my $cgi = CGI->new; |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
my $html = $cgi->start_html("Foo"); |
92
|
|
|
|
|
|
|
$html .= <
|
93
|
|
|
|
|
|
|
Bar |
94
|
|
|
|
|
|
|
HTML |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
$html .= $cgi->end_html; |
97
|
|
|
|
|
|
|
return (OK, $html); |
98
|
|
|
|
|
|
|
} # add_client |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
sub edit_client { |
102
|
|
|
|
|
|
|
my $apache2 = shift; |
103
|
|
|
|
|
|
|
my $cgi = CGI->new; |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
my $html = $cgi->start_html("Foo"); |
106
|
|
|
|
|
|
|
$html .= <
|
107
|
|
|
|
|
|
|
Bar |
108
|
|
|
|
|
|
|
HTML |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
$html .= $cgi->end_html; |
111
|
|
|
|
|
|
|
return (OK, $html); |
112
|
|
|
|
|
|
|
} # edit_client |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
sub permissions { |
116
|
|
|
|
|
|
|
my $apache2 = shift; |
117
|
|
|
|
|
|
|
my $cgi = CGI->new; |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
my $html = $cgi->start_html("Foo"); |
120
|
|
|
|
|
|
|
$html .= <
|
121
|
|
|
|
|
|
|
Bar |
122
|
|
|
|
|
|
|
HTML |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
$html .= $cgi->end_html; |
125
|
|
|
|
|
|
|
return (OK, $html); |
126
|
|
|
|
|
|
|
} # permissions |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
sub groups { |
130
|
|
|
|
|
|
|
my $apache2 = shift; |
131
|
|
|
|
|
|
|
my $cgi = CGI->new; |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
my $html = $cgi->start_html("Foo"); |
134
|
|
|
|
|
|
|
$html .= <
|
135
|
|
|
|
|
|
|
Bar |
136
|
|
|
|
|
|
|
HTML |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
$html .= $cgi->end_html; |
139
|
|
|
|
|
|
|
return (OK, $html); |
140
|
|
|
|
|
|
|
} # groups |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
=head1 AUTHOR |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
Sean P. Quinlan, C<< >> |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
=head1 BUGS |
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
Please report any bugs or feature requests to |
150
|
|
|
|
|
|
|
C, or through the web interface at |
151
|
|
|
|
|
|
|
L. |
152
|
|
|
|
|
|
|
I will be notified, and then you'll automatically be notified of progress on |
153
|
|
|
|
|
|
|
your bug as I make changes. |
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
=head1 SUPPORT |
156
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
You can find documentation for this module with the perldoc command. |
158
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
perldoc CAS::Apache |
160
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
You can also look for information at: |
162
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
=over 4 |
164
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
=item * AnnoCPAN: Annotated CPAN documentation |
166
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
L |
168
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
=item * CPAN Ratings |
170
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
L |
172
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
=item * RT: CPAN's request tracker |
174
|
|
|
|
|
|
|
|
175
|
|
|
|
|
|
|
L |
176
|
|
|
|
|
|
|
|
177
|
|
|
|
|
|
|
=item * Search CPAN |
178
|
|
|
|
|
|
|
|
179
|
|
|
|
|
|
|
L |
180
|
|
|
|
|
|
|
|
181
|
|
|
|
|
|
|
=back |
182
|
|
|
|
|
|
|
|
183
|
|
|
|
|
|
|
=head1 ACKNOWLEDGEMENTS |
184
|
|
|
|
|
|
|
|
185
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
186
|
|
|
|
|
|
|
|
187
|
|
|
|
|
|
|
Copyright 2006 Sean P. Quinlan, all rights reserved. |
188
|
|
|
|
|
|
|
|
189
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
190
|
|
|
|
|
|
|
under the same terms as Perl itself. |
191
|
|
|
|
|
|
|
|
192
|
|
|
|
|
|
|
=cut |
193
|
|
|
|
|
|
|
|
194
|
|
|
|
|
|
|
1; # End of CAS::Apache::UserForms |