httpd-apreq-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r170502 - /httpd/apreq/trunk/glue/perl/xsbuilder/APR/Request/Request.pod
Date Tue, 17 May 2005 01:51:45 GMT
Author: joes
Date: Mon May 16 18:51:44 2005
New Revision: 170502

URL: http://svn.apache.org/viewcvs?rev=170502&view=rev
Log:
Simple Test::Inline stuff for perldocs.

Modified:
    httpd/apreq/trunk/glue/perl/xsbuilder/APR/Request/Request.pod

Modified: httpd/apreq/trunk/glue/perl/xsbuilder/APR/Request/Request.pod
URL: http://svn.apache.org/viewcvs/httpd/apreq/trunk/glue/perl/xsbuilder/APR/Request/Request.pod?rev=170502&r1=170501&r2=170502&view=diff
==============================================================================
--- httpd/apreq/trunk/glue/perl/xsbuilder/APR/Request/Request.pod (original)
+++ httpd/apreq/trunk/glue/perl/xsbuilder/APR/Request/Request.pod Mon May 16 18:51:44 2005
@@ -3,15 +3,43 @@
 APR::Request - wrapper for libapreq2's module/handle API.
 
 
+=for testing
+    use APR::Pool;
+    use APR::Brigade;
+    use APR::Bucket;
+    use APR::BucketAlloc;
+    use APR::Request;
+    use APR::Request::Parser;
+    $pool = APR::Pool->new;
+    $ba = APR::BucketAlloc->new($pool);
+    $bb = APR::Brigade->new($pool, $ba);
+    $bb->insert_tail(APR::Bucket->new($ba, "alpha=body1&beta=body2;foo=body3"));
+    $parser = APR::Request::Parser->urlencoded($pool, $ba, 
+                                    "application/x-www-form-urlencoded");
+
+
 
 
 =head1 SYNOPSIS
 
+
+=for example begin
+
   use APR::Request;
 
-  my $req = $derived_class->handle( ... );
+  $req = APR::Request::Custom->handle($pool, 
+                                      "foo=arg1&bar=arg2", 
+                                      "cookie=apache",
+                                       $parser, 1e6, $bb);
   $param = $req->param("foo");
-  $cookie = $req->jar("bar");
+  $cookie = $req->jar("cookie");
+
+=for example end
+
+=for example_testing
+    ok $req->isa("APR::Request");
+    is $param, "arg1", "param";
+    is $cookie, "apache", "cookie";
 
 
 



Mime
View raw message