stas 2004/06/23 14:13:36 Modified: src/docs/2.0/api/Apache RequestUtil.pod Log: polish the pnotes() entry Revision Changes Path 1.18 +27 -10 modperl-docs/src/docs/2.0/api/Apache/RequestUtil.pod Index: RequestUtil.pod =================================================================== RCS file: /home/cvs/modperl-docs/src/docs/2.0/api/Apache/RequestUtil.pod,v retrieving revision 1.17 retrieving revision 1.18 diff -u -u -r1.17 -r1.18 --- RequestUtil.pod 22 May 2004 02:03:27 -0000 1.17 +++ RequestUtil.pod 23 Jun 2004 21:13:36 -0000 1.18 @@ -322,31 +322,48 @@ =head2 C<pnotes> -META: Autogenerated - needs to be reviewed/completed +Share Perl variables between Perl HTTP handlers -Notes from one module to another - - $pnotes = $r->pnotes(); - $pnotes = $r->pnotes($new_pnotes); + $old_val = $r->pnotes($key => $val); + $val = $r->pnotes($key); + $hash_ref = $r->pnotes(); =over 4 =item obj: C<$r> (C<L<Apache::RequestRec|docs::2.0::api::Apache::RequestRec>>) -=item opt arg2: C<$new_pnotes> (C<L<APR::Table|docs::2.0::api::APR::Table>>) +=item opt arg1: C<$key> ( string ) + +A key value + +=item opt arg2: C<$val> ( SCALAR ) + +Any scalar value (e.g. a reference to an array) -=item ret: C<$pnotes> (C<L<APR::Table|docs::2.0::api::APR::Table>>) +=item ret: (3 different possible values) +if both, C<$key> and C<$val> are passed the previous value for C<$key> +is returned if such existed, otherwise C<undef> is returned. + +if only C<$key> is passed, the current value for the given key is +returned. + +if no arguments are passed, a hash reference is returned, which can +then be directly accessed without going through the C<pnotes()> +interface. + +=item since: 1.99_10 =back Similar to (C<L<Apache::RequestRec|docs::2.0::api::Apache::RequestRec/C_notes_>>), -but values can be any perl variables. That also means that it can be -used only between perl modules. - +but values can be any Perl variables. That also means that it can be +used only between Perl modules. +The values get reset automatically at the end of each HTTP request. +META: Examples (t/response/TestModperl/pnotes.pm) =head2 C<no_cache>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]