httpd-apreq-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r164416 - in /httpd/apreq/trunk: Makefile.am glue/perl/lib/Apache2/Cookie.pm glue/perl/lib/Apache2/Request.pm glue/perl/lib/Apache2/Upload.pm include/groups.dox.in
Date Sat, 23 Apr 2005 20:24:09 GMT
Author: joes
Date: Sat Apr 23 13:24:07 2005
New Revision: 164416

URL: http://svn.apache.org/viewcvs?rev=164416&view=rev
Log:
perldoc fixes.

Modified:
    httpd/apreq/trunk/Makefile.am
    httpd/apreq/trunk/glue/perl/lib/Apache2/Cookie.pm
    httpd/apreq/trunk/glue/perl/lib/Apache2/Request.pm
    httpd/apreq/trunk/glue/perl/lib/Apache2/Upload.pm
    httpd/apreq/trunk/include/groups.dox.in

Modified: httpd/apreq/trunk/Makefile.am
URL: http://svn.apache.org/viewcvs/httpd/apreq/trunk/Makefile.am?rev=164416&r1=164415&r2=164416&view=diff
==============================================================================
--- httpd/apreq/trunk/Makefile.am (original)
+++ httpd/apreq/trunk/Makefile.am Sat Apr 23 13:24:07 2005
@@ -13,7 +13,7 @@
 APR_DOX = (cd $(APR_SRCDIR); cat docs/doxygen.conf - | doxygen -)
 SED_BODY_TAG= s(^[\S\s]+<body.+|</body>[\S\s]+$$)()gi, s(href="/Apache(?:/\w+)*/([^/]+).html")(href="group__apreq__xs__\L$$1.html")g
 EUM=ExtUtils::Manifest
-POD_DIR=glue/perl/docs
+POD_DIR=glue/perl/lib/Apache2
 bin_SCRIPTS = apreq2-config
 CLEANFILES = $(bin_SCRIPTS)
 
@@ -56,10 +56,10 @@
 	$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
 	cp -a docs $(DESTDIR)$(pkgdatadir)
 
-%.html: $(POD_DIR)/%.pod Makefile.am 
+%.html: $(POD_DIR)/%.pm Makefile.am 
 	pod2html < $< | perl -0777 -pe '$(SED_BODY_TAG)' > $@
 
-pod2html :: Request.html Cookie.html Upload.html Table.html Error.html FAQ.html
+pod2html :: Request.html Cookie.html Upload.html FAQ.html
 
 FAQ.html: Makefile.am FAQ.pod
 	pod2html < FAQ.pod | perl -0777 -pe '$(SED_BODY_TAG)' > FAQ.html

Modified: httpd/apreq/trunk/glue/perl/lib/Apache2/Cookie.pm
URL: http://svn.apache.org/viewcvs/httpd/apreq/trunk/glue/perl/lib/Apache2/Cookie.pm?rev=164416&r1=164415&r2=164416&view=diff
==============================================================================
--- httpd/apreq/trunk/glue/perl/lib/Apache2/Cookie.pm (original)
+++ httpd/apreq/trunk/glue/perl/lib/Apache2/Cookie.pm Sat Apr 23 13:24:07 2005
@@ -117,19 +117,18 @@
 
 __END__
 
-Apache::Cookie, Apache::Cookie::Jar - HTTP Cookies Class
+=head1 NAME
+
+Apache2::Cookie, Apache2::Cookie::Jar - HTTP Cookies Class
 
 =for testing
-    use Apache::Cookie;
+    use Apache2::Cookie;
     use APR::Pool;
     # use $r instead of $p here, so doc examples reflect mp2 env, not CGI/test env
     $r = APR::Pool->new; 
-    $j = Apache::Cookie::Jar->new($r);
-    $j->cookies->{foo} = Apache::Cookie->new($r, name => "foo", value => "1");
-    $j->cookies->add( Apache::Cookie->new($r, name => "bar", value => "2")
);
-    # We must disable bake and bake2 in the api tests, 
-    # since they write directly to fd 1 via apr_file_write().
-    *Apache::Cookie::bake = *Apache::Cookie::bake2 = *Apache::Cookie::as_string;
+    $j = Apache2::Cookie::Jar->new($r);
+    $j->cookies->{foo} = Apache2::Cookie->new($r, name => "foo", value =>
"1");
+    $j->cookies->add( Apache2::Cookie->new($r, name => "bar", value => "2")
);
 
 
 
@@ -139,12 +138,12 @@
 
 =for example begin
 
-    use Apache::Cookie;
+    use Apache2::Cookie;
 
-    $j = Apache::Cookie::Jar->new($r);
+    $j = Apache2::Cookie::Jar->new($r);
     $c_in = $j->cookies("foo");         # get cookie from request headers
 
-    $c_out = Apache::Cookie->new($r, 
+    $c_out = Apache2::Cookie->new($r, 
                                   -name  => "mycookie",
                                   -value => $c_in->name );
 
@@ -164,24 +163,21 @@
 =head1 DESCRIPTION
 
 
-The 2.X Apache::Cookie module is based on the original 1.X versions, which mimic 
+The Apache2::Cookie module is based on the original 1.X versions, which mimic 
 the CGI::Cookie API.  The current version of this module includes several packages 
-and methods which are patterned after Apache::Request, yet remain largely 
+and methods which are patterned after Apache2::Request, yet remain largely 
 backwards-compatible with the original 1.X API (see the L<PORTING from 1.X> section

 below for known issues).
 
-This manpage documents the Apache::Cookie and Apache::Cookie::Jar packages.  
-Apache::Cookie::Error, Apache::Cookie::Jar::Error and Apache::Cookie::Table
-are also provided by this module but documented elsewhere (related manpages
-listed in L<SEE ALSO>).
+This manpage documents the Apache2::Cookie and Apache2::Cookie::Jar packages.
 
 
 
 
-=head1 Apache::Cookie::Jar
+=head1 Apache2::Cookie::Jar
 
-This class collects Apache::Cookie objects into a lookup table.  It plays
-the same role for accessing the incoming cookies as Apache::Request does for 
+This class collects Apache2::Cookie objects into a lookup table.  It plays
+the same role for accessing the incoming cookies as Apache2::Request does for
 accessing the incoming params and file uploads.
 
 
@@ -189,13 +185,13 @@
 
 =head2 new
 
-    Apache::Cookie::Jar->new($env, %args)
+    Apache2::Cookie::Jar->new($env, %args)
 
 Class method that retrieves the parsed cookie jar from the current 
 environment.  An optional VALUE_CLASS => $class argument instructs
 the jar to bless any returned cookies into $class instead
-of Apache::Cookie.  This feature is meant to be useful in situations 
-where C<Apache::Cookie::thaw()> is unable to correctly interpret an incoming
+of Apache2::Cookie.  This feature is meant to be useful in situations 
+where C<Apache2::Cookie::thaw()> is unable to correctly interpret an incoming
 cookie's serialization.  Users can simply override C<thaw> in an
 application-specific subclass and pass that subclass's name as the 
 VALUE_CLASS argument:
@@ -204,16 +200,16 @@
 
     {
         package FOO;
-        @ISA= 'Apache::Cookie';
+        @ISA= 'Apache2::Cookie';
     }
-    my $jar = Apache::Cookie::Jar->new($r, VALUE_CLASS => "FOO");
+    my $jar = Apache2::Cookie::Jar->new($r, VALUE_CLASS => "FOO");
     ok $jar->cookies("foo")->isa("FOO");
     ok $jar->cookies->{bar}->isa("FOO");
 
 =for example end
 
 =for example_testing
-    ok $jar->isa("Apache::Cookie::Jar");
+    ok $jar->isa("Apache2::Cookie::Jar");
     $jar->cookies->do(sub { ok $_[1]->isa("FOO"); });
     map { ok $_->isa("FOO") } values %{$jar->cookies};
 
@@ -230,7 +226,7 @@
 full list of such cookies are returned.
 
 If the $key argument is omitted, C<< scalar $jar->cookies() >> will 
-return an Apache::Cookie::Table object containing all the cookies in 
+return an APR::Request::Cookie::Table object containing all the cookies in 
 the jar.  Modifications to the this object will affect the jar's 
 internal I<cookies> table in C<apreq_jar_t>, so their impact will 
 be noticed by all libapreq2 applications during this request.
@@ -239,18 +235,18 @@
 for all the cookies in the jar.  The order corresponds to the 
 order in which the cookies appeared in the incoming "Cookie" header.
 
-This method will throw an Apache::Cookie::Jar::Error object into $@ if
-the returned value(s) may be unreliable.  In particular, note that 
+This method will throw an C<< APR::Request::Error >> object into $@ if
+the returned value(s) could be unreliable.  In particular, note that
 C<< scalar $jar->cookies("foo") >> will not croak if it can locate
-the a "foo" cookie within the jar's parsed cookie table, even if the 
+the a "foo" cookie within the jar's parsed cookie table, even if the
 cookie parser has failed (the cookies are parsed in the same order
-as they appeared in the "Cookie" header). In all other circumstances 
-C<cookies> will croak if the parser failed to successfully parse the 
+as they appeared in the "Cookie" header). In all other circumstances
+C<cookies> will croak if the parser failed to successfully parse the
 "Cookie" header.
 
 =for example begin
 
-    $c = Apache::Cookie->new($r, name => "foo", value => 3);
+    $c = Apache2::Cookie->new($r, name => "foo", value => 3);
     $j->cookies->add($c);
 
     $cookie = $j->cookies("foo");  # first foo cookie
@@ -283,7 +279,7 @@
     $j->status(-1);
     ok $j->status == -1;
     eval { @cookies = $j->cookies("foo") };   # croaks
-    ok $@->isa("Apache::Cookie::Jar::Error");
+    ok $@->isa("Apache2::Cookie::Jar::Error");
     $j->status(0);
 
 =for example end
@@ -296,42 +292,20 @@
 
 
 
-=head2 env
-
-    Apache::Cookie::Jar->env()
-    $jar->env()
-
-As a class method C<< Apache::Cookie::Jar->env >> returns
-the environment class associated with Apache::Cookie::Jar. 
-As an object method, C<< $jar->env >> returns the environment 
-object which first created the $jar (via C<new>).
-
-=for example begin
-
-    ok $j->env->isa(Apache::Cookie::Jar->env);
-
-=for example end
-
-=for example_testing
-    ok (Apache::Cookie::Jar->env eq "APR::Pool", 'env() isa APR::Pool');
-
-
-
-
-=head1 Apache::Cookie
+=head1 Apache2::Cookie
 
 
 
 
 =head2 new
 
-    Apache::Cookie->new($env, %args)
+    Apache2::Cookie->new($env, %args)
 
 Just like CGI::Cookie::new, but requires an additional environment argument:
 
 =for example begin
 
-    $cookie = Apache::Cookie->new($r,
+    $cookie = Apache2::Cookie->new($r,
                              -name    =>  'foo', 
                              -value   =>  'bar', 
                              -expires =>  '+3M', 
@@ -350,7 +324,7 @@
     ok $cookie->secure == 1,                '$cookie->secure == 1';
 
 The C<-value> argument may be either an arrayref, a hashref, or
-a string.  C<Apache::Cookie::freeze> encodes this argument into the 
+a string.  C<Apache2::Cookie::freeze> encodes this argument into the 
 cookie's raw value.
 
 
@@ -358,15 +332,15 @@
 
 =head2 freeze
 
-    Apache::Cookie->freeze($value)
+    Apache2::Cookie->freeze($value)
 
-Helper function (for C<new>) that serializes a new cookie's value in a 
-manner compatible with CGI::Cookie (and Apache::Cookie 1.X).  This class 
+Helper function (for C<new>) that serializes a new cookie's value in a
+manner compatible with CGI::Cookie (and Apache2::Cookie 1.X).  This class
 method accepts an arrayref, hashref, or normal perl string in $value.
 
 =for example begin
 
-    $value = Apache::Cookie->freeze(["2+2", "=4"]);
+    $value = Apache2::Cookie->freeze(["2+2", "=4"]);
 
 =for example end
 
@@ -378,19 +352,19 @@
 
 =head2 thaw
 
-    Apache::Cookie->thaw($value)
+    Apache2::Cookie->thaw($value)
     $cookie->thaw()
 
 
 This is the helper method (for C<value>) responsible for decoding the 
 raw value of a cookie.  An optional argument $value may be used in
 place of the cookie's raw value.  This method can also decode cookie 
-values created using CGI::Cookie or Apache::Cookie 1.X.
+values created using CGI::Cookie or Apache2::Cookie 1.X.
 
 =for example begin
 
     print $cookie->thaw;                    # prints "bar"
-    @values = Apache::Cookie->thaw($value); # ( "2+2", "=4" )
+    @values = Apache2::Cookie->thaw($value); # ( "2+2", "=4" )
 
 =for example end
 
@@ -407,7 +381,7 @@
 
     $cookie->as_string()
 
-Format the cookie object as a string.  The quote-operator for Apache::Cookie 
+Format the cookie object as a string.  The quote-operator for Apache2::Cookie 
 is overloaded to run this method whenever a cookie appears in quotes.
 
 
@@ -455,13 +429,13 @@
 
 Note: if the cookie's value was created using a  C<freeze> method, 
 one way to reconstitute the object is by subclassing 
-Apache::Cookie with a package that provides the associated C<thaw> sub:
+Apache2::Cookie with a package that provides the associated C<thaw> sub:
 
 =for example begin
 
     {
         package My::COOKIE;
-        @ISA = 'Apache::Cookie'; 
+        @ISA = 'Apache2::Cookie'; 
         sub thaw { my $val = shift->raw_value; $val =~ tr/a-z/A-Z/; $val }
     }
 
@@ -495,7 +469,7 @@
 
 =head2 bake
 
-    $cookie->bake()
+    $cookie->bake($r)
 
 Adds a I<Set-Cookie> header to the outgoing headers table.
 
@@ -504,7 +478,7 @@
 
 =head2 bake2
 
-    $cookie->bake2()
+    $cookie->bake2($r)
 
 Adds a I<Set-Cookie2> header to the outgoing headers table.
 
@@ -668,15 +642,15 @@
 
 =head2 fetch
 
-    Apache::Cookie->fetch($r)
+    Apache2::Cookie->fetch($r)
 
 Fetch and parse the incoming I<Cookie> header:
 
 =for example begin
 
-    my $cookies = Apache::Cookie->fetch($r); # Apache::Cookie::Table ref
+    my $cookies = Apache2::Cookie->fetch($r); # APR::Request::Cookie::Table ref
 
-    my %cookies = Apache::Cookie->fetch($r);
+    my %cookies = Apache2::Cookie->fetch($r);
 
 =for example end
 
@@ -695,13 +669,13 @@
 
 =over 4
 
-=item * C<Apache::Cookie::fetch> now expects an C<$r> object as (second) 
-        argument, although this isn't necessary in mod_perl 2 if 
-        C<Apache::RequestUtil> is loaded.
+=item * C<Apache2::Cookie::fetch> now expects an C<$r> object as (second) 
+        argument, although this isn't necessary in mod_perl 2 if
+        C<Apache2::RequestUtil> is loaded.
 
-=item * C<Apache::Cookie::parse> is gone.
+=item * C<Apache2::Cookie::parse> is gone.
 
-=item * C<Apache::Cookie::new> no longer encodes the supplied cookie name.  
+=item * C<Apache2::Cookie::new> no longer encodes the supplied cookie name.
 
 =item * C<name()> and C<value()> no longer accept a "set" argument. In other
words,
         neither a cookie's name, nor its value, may be modified.  A new cookie
@@ -714,9 +688,8 @@
 
 =head1 SEE ALSO
 
-L<Apache::Cookie::Table>, L<Apache::Cookie::Error>, 
-L<Apache::Cookie::Jar::Error>, L<Apache::Request>,
-CGI::Cookie(3)
+L<Apache2::Request>, L<APR::Request::Cookie>,
+L<APR::Request::Error>, CGI::Cookie(3)
 
 
 

Modified: httpd/apreq/trunk/glue/perl/lib/Apache2/Request.pm
URL: http://svn.apache.org/viewcvs/httpd/apreq/trunk/glue/perl/lib/Apache2/Request.pm?rev=164416&r1=164415&r2=164416&view=diff
==============================================================================
--- httpd/apreq/trunk/glue/perl/lib/Apache2/Request.pm (original)
+++ httpd/apreq/trunk/glue/perl/lib/Apache2/Request.pm Sat Apr 23 13:24:07 2005
@@ -33,18 +33,19 @@
 1;
 
 __END__
+
 =head1 NAME
 
-Apache::Request - Methods for dealing with client request data
+Apache2::Request - Methods for dealing with client request data
 
 
 =for testing
-    use Apache::Request;
-    use Apache::Upload;
+    use Apache2::Request;
+    use Apache2::Upload;
     use APR::Pool;
     $r = APR::Pool->new;
-    $req = Apache::Request->new($r);
-    $u = Apache::Upload->new($r, name => "foo", file => __FILE__);
+    $req = Apache2::Request->new($r);
+    $u = Apache2::Upload->new($r, name => "foo", file => __FILE__);
     $req->body_status(0);
     $req->parse;
     $req->body->add($u);
@@ -59,15 +60,15 @@
 
 =for example begin
 
-    use Apache::Request;
-    $req = Apache::Request->new($r);
+    use Apache2::Request;
+    $req = Apache2::Request->new($r);
     @foo = $req->param("foo");
     $bar = $req->args("bar");
 
 =for example end
 
 =for example_testing
-    ok $req->isa("Apache::Request");
+    ok $req->isa("Apache2::Request");
     is "@foo", join " ", 1, 3, __FILE__;
     is $bar, 2;
 
@@ -76,28 +77,25 @@
 
 =head1 DESCRIPTION
 
-The Apache::Request module provides methods for parsing GET and POST parameters
+The Apache2::Request module provides methods for parsing GET and POST parameters
 encoded with either I<application/x-www-form-urlencoded> or I<multipart/form-data>.
-Although Apache::Request provides a few new APIs for accessing the parsed data,
+Although Apache2::Request provides a few new APIs for accessing the parsed data,
 it remains largely backwards-compatible with the original 1.X API.  See the
 L<PORTING from 1.X> section below for a list of known issues.
 
-This manpage documents the Apache::Request package.  Apache::Request::Table 
-and Apache::Request::Error are also provided by this module, but are 
-documented elsewhere.  Please read the L<SEE ALSO> section below for a list
-of related manpages.
+This manpage documents the Apache2::Request package.
 
 
 
 
-=head1 Apache::Request
+=head1 Apache2::Request
 
 The interface is designed to mimic the CGI.pm routines for parsing
 query parameters. The main differences are 
 
 =over 4
 
-=item * C<Apache::Request::new> takes an environment-specific
+=item * C<Apache2::Request::new> takes an environment-specific
         object C<$r> as (second) argument.  Newer versions of CGI.pm also accept
         this syntax within modperl.
 
@@ -113,25 +111,25 @@
 
 =head2 new
 
-    Apache::Request->new($r, %args)
+    Apache2::Request->new($r, %args)
 
-Creates a new Apache::Request object.
+Creates a new Apache2::Request object.
 
 
 =for example begin
 
-    my $req = Apache::Request->new($r, POST_MAX => "1M");
+    my $req = Apache2::Request->new($r, POST_MAX => "1M");
 
 
 =for example end
 
 =for example_testing
     ok ref $req;
-    ok $req->isa("Apache::Request");
+    ok $req->isa("Apache2::Request");
 
 
-With mod_perl2, the environment object $r must be an Apache::RequestRec
-object.  In that case, all methods from Apache::RequestRec are inherited.
+With mod_perl2, the environment object $r must be an Apache2::RequestRec
+object.  In that case, all methods from Apache2::RequestRec are inherited.
 In the (default) CGI environment, $r must be an APR::Pool object.
 
 The following args are optional:
@@ -157,14 +155,14 @@
 
 =for example begin
 
- use Apache::Upload;
- my $req = Apache::Request->new($r, TEMP_DIR => "/home/httpd/tmp");
+ use Apache2::Upload;
+ my $req = Apache2::Request->new($r, TEMP_DIR => "/home/httpd/tmp");
  my $upload = $req->upload('file');
  $upload->link("/home/user/myfile");
 
 =for example end
 
-For more details on C<link>, see L<Apache::Upload>.
+For more details on C<link>, see L<Apache2::Upload>.
 
 
 =item * C<HOOK_DATA>
@@ -188,10 +186,10 @@
     warn "$hook_data: got $data_len bytes for " . $upload->name;
   };
 
-  my $req = Apache::Request->new($r, 
-                                 HOOK_DATA => "Note",
-                                 UPLOAD_HOOK => $transparent_hook,
-                                );
+  my $req = Apache2::Request->new($r, 
+                                  HOOK_DATA => "Note",
+                                  UPLOAD_HOOK => $transparent_hook,
+                                 );
 
 =for example end
 
@@ -203,13 +201,13 @@
 
 =head2 instance
 
-    Apache::Request->instance($r)
+    Apache2::Request->instance($r)
 
-The default (and only) behavior of I<Apache::Request> is to intelligently
+The default (and only) behavior of I<Apache2::Request> is to intelligently
 cache B<POST> data for the duration of the request.  Thus there is no longer
-the need for a separate C<instance()> method as existed in I<Apache::Request>
+the need for a separate C<instance()> method as existed in I<Apache2::Request>
 for Apache 1.3 - all B<POST> data is always available from each and every 
-I<Apache::Request> object created during the request's lifetime.
+I<Apache2::Request> object created during the request's lifetime.
 
 However an C<instance()> method is aliased to C<new()> in this release
 to ease the pain of porting from 1.X to 2.X.
@@ -236,7 +234,7 @@
 
     # the following differ slightly from CGI.pm
 
-    # returns ref to Apache::Request::Table object representing 
+    # returns ref to APR::Request::Param::Table object representing 
     # all (args + body) params
     my $table = $req->param;
     @table_keys = keys %$table;
@@ -269,7 +267,7 @@
 an exception if it can locate "foo" in the existing body or
 args tables, even if the query-string parser or the body parser
 has failed.  In all other circumstances C<param> will throw an
-Apache::Request::Error object into $@ should either parser fail.
+Apache2::Request::Error object into $@ should either parser fail.
 
 =for example begin
 
@@ -279,10 +277,10 @@
     $foo = $req->param("foo");
     ok $foo == 1;
     eval { @foo = $req->param("foo") };
-    ok $@->isa("Apache::Request::Error");
+    ok $@->isa("Apache2::Request::Error");
     undef $@;
     eval { my $not_found = $req->param("non-existent-param") };
-    ok $@->isa("Apache::Request::Error");
+    ok $@->isa("Apache2::Request::Error");
 
     $req->args_status(0); # reset query-string parser state to "success"
 
@@ -312,55 +310,13 @@
 
 
 
-=head2 args
-
-    $req->args()
-    $req->args($name)
-
-Returns an I<Apache::Request::Table> object containing the query-string 
-parameters of the I<Apache::Request> object.
-
-=for example begin
-
-   my $args = $req->args;
-
-=for example end
-
-=for example_testing
-    my $n = 0;
-    while (($a, $b) = each %$args) {
-        is $a, (qw/foo bar foo/)[$n];
-        is $b, ++$n;
-    }
-
-An optional name parameter can be passed to return the query string
-parameter associated with the given name:
-
-=for example begin
-
-    my $foo_arg = $req->args("foo");
-
-=for example end
-
-=for example_testing
-    is $foo_arg, 1;
-
-More generally, C<args()> follows the same pattern as C<param()>
-with respect to its return values and argument list.  The main difference
-is that modifications to the C<< scalar $req->args() >> table affect
-the underlying apr_table_t attribute in apreq_request_t, so their impact
-will be noticed by all libapreq2 applications during this request.
-
-
-
-
 =head2 body
 
     $req->body()
     $req->body($name)
 
-Returns an I<Apache::Request::Table> object containing the POST data 
-parameters of the I<Apache::Request> object.
+Returns an I<APR::Request::Param::Table> object containing the POST data
+parameters of the I<Apache2::Request> object.
 
 =for example begin
 
@@ -399,18 +355,18 @@
     $req->upload()
     $req->upload($name)
 
-Requires C<Apache::Upload>.  With no arguments, this method
-returns an I<Apache::Upload::Table> object in scalar context, 
-or the names of all I<Apache::Upload> objects in list context.
+Requires C<Apache2::Upload>.  With no arguments, this method
+returns an I<APR::Request::Param::Table> object in scalar context, 
+or the names of all I<Apache2::Upload> objects in list context.
 
-An optional name parameter can be passed to return the I<Apache::Upload>
+An optional name parameter can be passed to return the I<Apache2::Upload>
 object associated with the given name:
 
     my $upload = $req->upload($name);
 
 More generally, C<upload()> follows the same pattern as C<param()>
 with respect to its return values and argument list.  The main difference
-is that its returned values are Apache::Upload object refs, not 
+is that its returned values are Apache2::Upload object refs, not 
 simple scalars.
 
 Note: modifications to the C<< scalar $req->upload() >> table only
@@ -477,7 +433,7 @@
     $req->parse()
 
 Forces the request to be parsed immediately.  In void context,
-this will throw an Apache::Request::Error should the either the
+this will throw an APR::Request::Error should the either the
 query-string or body parser fail. In all other contexts it will
 return the two parsers' combined I<APR> status code 
 
@@ -492,7 +448,7 @@
 
     sub handler {
         my $r = shift;
-        my $req = Apache::Request->new($r);
+        my $req = Apache2::Request->new($r);
         $r->discard_request_body;   # efficiently parses the request body
         my $parser_status = $req->body_status;
 
@@ -501,27 +457,27 @@
 
 Calling C<< $r->discard_request_body >> outside the content handler
 is generally a mistake, so use C<< $req->parse >> there, but 
-B<only as a last resort>.  The Apache::Request API is B<designed> 
+B<only as a last resort>.  The Apache2::Request API is B<designed> 
 around a lazy-parsing scheme, so calling C<parse> should not
 affect the behavior of any other methods.
 
 
 
 
-=head1 SUBCLASSING Apache::Request
+=head1 SUBCLASSING Apache2::Request
 
 If the instances of your subclass are hash references then you can actually
-inherit from Apache::Request as long as the Apache::Request object is stored in
-an attribute called "r" or "_r". (The Apache::Request class effectively does the
+inherit from Apache2::Request as long as the Apache2::Request object is stored in
+an attribute called "r" or "_r". (The Apache2::Request class effectively does the
 delegation for you automagically, as long as it knows where to find the
-Apache::Request object to delegate to.)  For example:
+Apache2::Request object to delegate to.)  For example:
 
 	package MySubClass;
-	use Apache::Request;
-	our @ISA = qw(Apache::Request);
+	use Apache2::Request;
+	our @ISA = qw(Apache2::Request);
 	sub new {
 		my($class, @args) = @_;
-		return bless { r => Apache::Request->new(@args) }, $class;
+		return bless { r => Apache2::Request->new(@args) }, $class;
 	}
 
 
@@ -530,18 +486,18 @@
 =head1 PORTING from 1.X
 
 This is the complete list of changes to existing methods 
-from Apache::Request 1.X.  These issues need to be 
+from Apache2::Request 1.X.  These issues need to be 
 addressed when porting 1.X apps to the new 2.X API.
 
 
 =over 4
 
-=item * Apache::Upload is now a separate module.  Applications
-        requiring the upload API must C<use Apache::Upload> in 2.X.
+=item * Apache2::Upload is now a separate module.  Applications
+        requiring the upload API must C<use Apache2::Upload> in 2.X.
         This is easily addressed by preloading the modules during 
         server startup.
 
-=item * You must use the C<Apache::Request::Table> API via 
+=item * You must use the C<Apache2::Request::Table> API via 
         C<< scalar $req->args >> or C<< scalar $req->body >>

         to assign new parameters to the request.  You may 
         no longer use the two-argument method calls; e.g.
@@ -576,8 +532,8 @@
 
 =head1 SEE ALSO
 
-L<Apache::Request::Table>, L<Apache::Request::Error>, L<Apache::Upload>,
-L<Apache::Cookie>, APR::Table(3).
+L<APR::Request::Param>, L<APR::Request::Error>, L<Apache2::Upload>,
+L<Apache2::Cookie>, APR::Table(3).
 
 
 

Modified: httpd/apreq/trunk/glue/perl/lib/Apache2/Upload.pm
URL: http://svn.apache.org/viewcvs/httpd/apreq/trunk/glue/perl/lib/Apache2/Upload.pm?rev=164416&r1=164415&r2=164416&view=diff
==============================================================================
--- httpd/apreq/trunk/glue/perl/lib/Apache2/Upload.pm (original)
+++ httpd/apreq/trunk/glue/perl/lib/Apache2/Upload.pm Sat Apr 23 13:24:07 2005
@@ -29,14 +29,14 @@
 
 =head1 NAME
 
-Apache::Upload - Methods for dealing with file uploads.
+Apache2::Upload - Methods for dealing with file uploads.
 
 =for testing
     use APR::Pool;
-    use Apache::Upload;
+    use Apache2::Upload;
     $r = APR::Pool->new;
-    $req = Apache::Request->new($r);
-    $u = Apache::Upload->new($r, name => "foo", file => __FILE__);
+    $req = Apache2::Request->new($r);
+    $u = Apache2::Upload->new($r, name => "foo", file => __FILE__);
     $req->body_status(0);
     $req->parse;
     $req->body->add(foo => "bar"); # dummy param with same name as upload
@@ -58,9 +58,9 @@
 
 =for example begin
 
-    use Apache::Upload;
+    use Apache2::Upload;
 
-    $req = Apache::Request->new($r);
+    $req = Apache2::Request->new($r);
     $upload = $req->upload("foo");
     $size = $upload->size;
 
@@ -90,21 +90,18 @@
 
 =head1 DESCRIPTION
 
-Apache::Upload is a new module based on the original package included
-in Apache::Request 1.X.  Users requiring the upload API must now 
-C<use Apache::Upload>, which adds the C<upload> method to Apache::Request.
-Apache::Upload is largely backwards-compatible with the original 1.X API.
+Apache2::Upload is a new module based on the original package included
+in Apache2::Request 1.X.  Users requiring the upload API must now 
+C<use Apache2::Upload>, which adds the C<upload> method to Apache2::Request.
+Apache2::Upload is largely backwards-compatible with the original 1.X API.
 See the L<PORTING from 1.X> section below for a list of known issues.
 
-This manpage documents the Apache::Upload and Apache::Upload::Brigade packages.  
-Apache::Upload::Table and Apache::Upload::Error are also provided by this module, 
-but are documented elsewhere.  For a list of related manpages, read the L<SEE ALSO>

-section below.
+This manpage documents the Apache2::Upload package.
 
 
 
 
-=head1 Apache::Upload
+=head1 Apache2::Upload
 
 
 
@@ -151,14 +148,14 @@
 
 Creates a tied IO handle.  This method is a more efficient version 
 of C<fh>, but with C<io> the handle ref returned is not seekable.  
-It is tied to an Apache::Upload::Brigade object, so you may use the 
+It is tied to an APR::Request::Brigade object, so you may use the 
 brigade API on the tied object if you want to manipulate the IO stream 
 (beyond simply reading from it).
 
 The returned reference is actually an object which has C<read> and 
 C<readline> methods available.  However these methods are just 
 syntactic sugar for the underlying C<READ> and C<READLINE> methods from 
-Apache::Upload::Brigade.  
+APR::Request::Brigade.  
 
 =for example begin
 
@@ -234,7 +231,7 @@
 
     $upload->type()
 
-Returns the MIME type of the given I<Apache::Upload> object.
+Returns the MIME type of the given I<Apache2::Upload> object.
 
 =for example begin
 
@@ -317,7 +314,7 @@
 
 
 
-=head1 Apache::Upload::Brigade
+=head1 APR::Request::Brigade
 
 
 This class is derived from APR::Brigade, providing additional
@@ -332,16 +329,16 @@
 
 =head2 TIEHANDLE
 
-    Apache::Upload::Brigade->TIEHANDLE($bb)
+    APR::Request::Brigade->TIEHANDLE($bb)
 
 Creates a copy of the bucket brigade represented by $bb, and
-blesses that copy into the Apache::Upload::Brigade class.  This
+blesses that copy into the APR::Request::Brigade class.  This
 provides syntactic sugar for using perl's builtin C<read>, C<readline>,
 and C<< <> >> operations on handles tied to this package:
 
     use Symbol;
     $fh = gensym;
-    tie *$fh, "Apache::Upload:Brigade", $bb;
+    tie *$fh, "APR::Request:Brigade", $bb;
     print while <$fh>;
 
 
@@ -377,7 +374,7 @@
 =over 4
 
 =item * C<< $upload->next() >> is no longer available;  please use the 
-C<< Apache::Upload::Table >> API when iterating over upload entries.
+C<< APR::Request::Param::Table >> API when iterating over upload entries.
 
 =item * C<info($header_name)> is replaced by C<info($set)>.
 
@@ -390,7 +387,7 @@
 
 =head1 SEE ALSO
 
-L<Apache::Upload::Table>, L<Apache::Upload::Error>, L<Apache::Request>,
+L<APR::Request::Param::Table>, L<APR::Request::Error>, L<Apache2::Request>,
 APR::Table(3)
 
 

Modified: httpd/apreq/trunk/include/groups.dox.in
URL: http://svn.apache.org/viewcvs/httpd/apreq/trunk/include/groups.dox.in?rev=164416&r1=164415&r2=164416&view=diff
==============================================================================
--- httpd/apreq/trunk/include/groups.dox.in (original)
+++ httpd/apreq/trunk/include/groups.dox.in Sat Apr 23 13:24:07 2005
@@ -61,33 +61,21 @@
  */
 
 /**
- * @defgroup apreq_xs_request Apache::Request
+ * @defgroup apreq_xs_request Apache2::Request
  * @ingroup apreq_xs
  * @htmlinclude Request.html
  */
 
 /**
- * @defgroup apreq_xs_upload Apache::Upload
+ * @defgroup apreq_xs_upload Apache2::Upload
  * @ingroup apreq_xs
  * @htmlinclude Upload.html
  */
 
 /**
- * @defgroup apreq_xs_cookie Apache::Cookie
+ * @defgroup apreq_xs_cookie Apache2::Cookie
  * @ingroup apreq_xs
  * @htmlinclude Cookie.html
- */
-
-/**
- * @defgroup apreq_xs_table Table Classes
- * @ingroup apreq_xs
- * @htmlinclude Table.html
- */
-
-/**
- * @defgroup apreq_xs_error Error Classes
- * @ingroup apreq_xs
- * @htmlinclude Error.html
  */
 
 /**



Mime
View raw message