/[suikacvs]/messaging/manakai/lib/Message/CGI/HTTP.pm
Suika

Diff of /messaging/manakai/lib/Message/CGI/HTTP.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by wakaba, Sat Aug 11 13:51:36 2007 UTC revision 1.4 by wakaba, Wed Aug 22 10:59:43 2007 UTC
# Line 14  This module is part of manakai. Line 14  This module is part of manakai.
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    
# Line 250  sub __uri_encode ($$;$) { Line 250  sub __uri_encode ($$;$) {
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    

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24