You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apreq-cvs@httpd.apache.org by jo...@apache.org on 2005/05/29 20:30:42 UTC
svn commit: r178976 - in /httpd/apreq/trunk/glue/perl/xsbuilder/APR/Request:
Cookie/Cookie.pm Cookie/Cookie.pod Param/Param.pod
Author: joes
Date: Sun May 29 11:30:42 2005
New Revision: 178976
URL: http://svn.apache.org/viewcvs?rev=178976&view=rev
Log:
Add EXISTS method and complete Cookie.pod docs.
Modified:
httpd/apreq/trunk/glue/perl/xsbuilder/APR/Request/Cookie/Cookie.pm
httpd/apreq/trunk/glue/perl/xsbuilder/APR/Request/Cookie/Cookie.pod
httpd/apreq/trunk/glue/perl/xsbuilder/APR/Request/Param/Param.pod
Modified: httpd/apreq/trunk/glue/perl/xsbuilder/APR/Request/Cookie/Cookie.pm
URL: http://svn.apache.org/viewcvs/httpd/apreq/trunk/glue/perl/xsbuilder/APR/Request/Cookie/Cookie.pm?rev=178976&r1=178975&r2=178976&view=diff
==============================================================================
--- httpd/apreq/trunk/glue/perl/xsbuilder/APR/Request/Cookie/Cookie.pm (original)
+++ httpd/apreq/trunk/glue/perl/xsbuilder/APR/Request/Cookie/Cookie.pm Sun May 29 11:30:42 2005
@@ -1,3 +1,4 @@
+package APR::Request::Cookie;
use APR::Request;
sub new {
@@ -17,4 +18,15 @@
}
sub freeze { return $_[1] }
-sub thaw { return shift->value }
+sub thaw {
+ my $obj = shift;
+ return shift if @_;
+ return "$obj";
+}
+
+package APR::Request::Cookie::Table;
+
+sub EXISTS {
+ my ($t, $key) = @_;
+ return defined $t->FETCH($key);
+}
Modified: httpd/apreq/trunk/glue/perl/xsbuilder/APR/Request/Cookie/Cookie.pod
URL: http://svn.apache.org/viewcvs/httpd/apreq/trunk/glue/perl/xsbuilder/APR/Request/Cookie/Cookie.pod?rev=178976&r1=178975&r2=178976&view=diff
==============================================================================
--- httpd/apreq/trunk/glue/perl/xsbuilder/APR/Request/Cookie/Cookie.pod (original)
+++ httpd/apreq/trunk/glue/perl/xsbuilder/APR/Request/Cookie/Cookie.pod Sun May 29 11:30:42 2005
@@ -314,7 +314,7 @@
Get/set the class each table element is blessed into during a
L<get> or L<FETCH> call. If defined, the class must be derived
-from APR::Request::Cookie. When called with set, it returns
+from APR::Request::Cookie. When called with $set, it returns
the $table. Otherwise it returns the name of the current class,
or undef if no cookie class is defined.
@@ -338,19 +338,32 @@
-
-
=head2 get
- $table->get($name)
- $table->get()
+ $table->get($key)
+Same as FETCH.
=head2 FETCH
- $table->FETCH($name)
+ $table->FETCH($key)
+
+In scalar context, this returns the first value matching
+$key (note: see NEXTKEY for additional notes). The match
+is always case-insensitive. In list context, this returns
+all matching values. Note: the type of the return values
+depends on the table's current cookie_class.
+
+
+
+
+=head EXISTS
+
+Synonym for C<< defined >>; these tables are not
+allowed to contain undefined values. Since these
+are constant tables, they don't autovivify either.
@@ -359,6 +372,8 @@
$table->FIRSTKEY()
+Returns the first key in the table.
+
@@ -366,6 +381,12 @@
$table->NEXTKEY()
+Returns the next key in the table. For perl 5.8+,
+if the key is multivalued, a subsequent FETCH on
+this key will return the corresponding value, until
+either NEXTKEY or FIRSTKEY is invoked again. For
+perl 5.6, FETCH always returns the first value.
+
@@ -373,12 +394,22 @@
$table->do($callback, @keys)
+Same as APR::Table::do; iterates over the table
+calling $callback->($key, $value) for each matching
+@keys. If @keys is empty, this iterates over the
+entire table.
+
+Note: The type of $value inserted into the callback
+depends on the table's current cookie_class.
=head1 SEE ALSO
-L<< Apache2::Cookie >>, L<< APR::Request >>
+L<< Apache2::Cookie >>, L<< APR::Request >>, L<< APR::Table >>.
+
+
+
=head1 COPYRIGHT
Modified: httpd/apreq/trunk/glue/perl/xsbuilder/APR/Request/Param/Param.pod
URL: http://svn.apache.org/viewcvs/httpd/apreq/trunk/glue/perl/xsbuilder/APR/Request/Param/Param.pod?rev=178976&r1=178975&r2=178976&view=diff
==============================================================================
--- httpd/apreq/trunk/glue/perl/xsbuilder/APR/Request/Param/Param.pod (original)
+++ httpd/apreq/trunk/glue/perl/xsbuilder/APR/Request/Param/Param.pod Sun May 29 11:30:42 2005
@@ -305,8 +305,8 @@
In scalar context, this returns the first value matching
$key (note: see NEXTKEY for additional notes). The match
is always case-insensitive. In list context, this returns
-all matching values.
-
+all matching values. Note: the type of the return values
+depends on the table's current param_class.