14 |
package Message::CGI::HTTP; |
package Message::CGI::HTTP; |
15 |
use strict; |
use strict; |
16 |
our $VERSION = do{my @r=(q$Revision$=~/\d+/g);sprintf "%d."."%02d" x $#r,@r}; |
our $VERSION = do{my @r=(q$Revision$=~/\d+/g);sprintf "%d."."%02d" x $#r,@r}; |
17 |
push our @ISA, 'Message::IF::CGIRequest'; |
push our @ISA, 'Message::IF::CGIRequest', 'Message::IF::HTTPCGIRequest'; |
18 |
|
|
19 |
=head1 METHODS |
=head1 METHODS |
20 |
|
|
250 |
return $s; |
return $s; |
251 |
} # __uri_encode |
} # __uri_encode |
252 |
|
|
253 |
|
=item I<$value> = I<$cgi>->path_info ([I<$new_value>]); |
254 |
|
|
255 |
|
This method reflects the meta-variable with the same name (in uppercase). |
256 |
|
|
257 |
|
=cut |
258 |
|
|
259 |
|
for ( |
260 |
|
[path_info => 'PATH_INFO'], |
261 |
|
[query_string => 'QUERY_STRING'], |
262 |
|
[request_method => 'REQUEST_METHOD'], |
263 |
|
[script_name => 'SCRIPT_NAME'], |
264 |
|
) { |
265 |
|
eval qq{ |
266 |
|
sub $_->[0] (\$;\$) { |
267 |
|
if (\@_ > 1) { |
268 |
|
if (defined \$_[1]) { |
269 |
|
\$main::ENV{'$_->[1]'} = ''.\$_[1]; |
270 |
|
} else { |
271 |
|
delete \$main::ENV{'$_->[1]'}; |
272 |
|
} |
273 |
|
} |
274 |
|
return \$main::ENV{'$_->[1]'}; |
275 |
|
} |
276 |
|
}; |
277 |
|
} |
278 |
|
|
279 |
package Message::IF::CGIRequest; |
package Message::IF::CGIRequest; |
280 |
|
package Message::IF::HTTPCGIRequest; |
281 |
|
|
282 |
=back |
=back |
283 |
|
|