Author: joes
Date: Thu Apr 28 07:39:05 2005
New Revision: 165148
URL: http://svn.apache.org/viewcvs?rev=165148&view=rev
Log:
Time to fix args().
Modified:
httpd/apreq/trunk/CHANGES
httpd/apreq/trunk/glue/perl/t/response/TestApReq/request.pm
httpd/apreq/trunk/glue/perl/t/response/TestApReq/upload.pm
Modified: httpd/apreq/trunk/CHANGES
URL:
http://svn.apache.org/viewcvs/httpd/apreq/trunk/CHANGES?rev=165148&r1=165147&r2=165148&view=diff
==============================================================================
--- httpd/apreq/trunk/CHANGES (original)
+++ httpd/apreq/trunk/CHANGES Thu Apr 28 07:39:05 2005
@@ -5,6 +5,11 @@
@section v2_05_dev Changes with libapreq2-2.05-dev
+- Perl API [joes]
+ Remove Apache2::Request::args. WARNING: through inheritance,
+ args() now maps to Apache2::RequestRec::args. Folks that want
+ the pre-2.05-dev behavior need to invoke APR::Request::args by name.
+
- C API [joes, Max Kellermann]
Add apreq_initialize, apreq_pre_initialize and apreq_post_initialize.
These are not thread-safe operations, so applications need to ensure
Modified: httpd/apreq/trunk/glue/perl/t/response/TestApReq/request.pm
URL:
http://svn.apache.org/viewcvs/httpd/apreq/trunk/glue/perl/t/response/TestApReq/request.pm?rev=165148&r1=165147&r2=165148&view=diff
==============================================================================
--- httpd/apreq/trunk/glue/perl/t/response/TestApReq/request.pm (original)
+++ httpd/apreq/trunk/glue/perl/t/response/TestApReq/request.pm Thu Apr 28
07:39:05 2005
@@ -35,11 +35,11 @@
$req->read_limit(1_000_000);
$req->content_type('text/plain');
- my $test = $req->args('test');
+ my $test = $req->APR::Request::args('test');
my $method = $r->method;
if ($test eq 'param') {
- my $table = $req->args();
+ my $table = $req->APR::Request::args();
my $value = $req->param('value');
$req->print($value);
}
@@ -117,7 +117,7 @@
}
elsif ($test eq 'bad') {
require APR::Request::Error;
- eval {my $q = $req->args('query')};
+ eval {my $q = $req->APR::Request::args('query')};
if (ref $@ && [EMAIL PROTECTED]>isa("APR::Request::Error")) {
$req->upload("HTTPUPLOAD")->slurp(my $data);
$req->print($data);
@@ -140,10 +140,10 @@
$req->disable_uploads(1);
eval {my $upload = $req->upload('HTTPUPLOAD')};
if (ref $@ eq "APR::Request::Error") {
- my $args = [EMAIL PROTECTED]>{_r}->args('test'); # checks _r is an
object ref
+ my $args = [EMAIL PROTECTED]>{_r}->APR::Request::args('test'); #
checks _r is an object ref
my $upload = [EMAIL PROTECTED]>body('HTTPUPLOAD'); # no exception
this time!
die "args test failed" unless $args eq $test;
- $args = [EMAIL PROTECTED]>args;
+ $args = [EMAIL PROTECTED]>APR::Request::args;
my $test_string = "";
# MAGIC ITERATOR TESTS
Modified: httpd/apreq/trunk/glue/perl/t/response/TestApReq/upload.pm
URL:
http://svn.apache.org/viewcvs/httpd/apreq/trunk/glue/perl/t/response/TestApReq/upload.pm?rev=165148&r1=165147&r2=165148&view=diff
==============================================================================
--- httpd/apreq/trunk/glue/perl/t/response/TestApReq/upload.pm (original)
+++ httpd/apreq/trunk/glue/perl/t/response/TestApReq/upload.pm Thu Apr 28
07:39:05 2005
@@ -15,8 +15,8 @@
my $req = Apache2::Request->new($r);
my $temp_dir = File::Spec->tmpdir;
- my $method = $req->args('method');
- my $has_md5 = $req->args('has_md5');
+ my $method = $req->APR::Request::args('method');
+ my $has_md5 = $req->APR::Request::args('has_md5');
require Digest::MD5 if $has_md5;
my $upload = $req->upload(($req->upload)[0]);
my $type = $upload->type;