1docs::api::Apache2::ConUnseecrtiCoonnUttriilb(u3t)ed PerdlocDso:c:uampein:t:aAtpiaocnhe2::ConnectionUtil(3)
2
3
4

NAME

6       Apache2::ConnectionUtil - Perl API for Apache connection utils
7

Synopsis

9          use Apache2::Connection     ();
10          use Apache2::ConnectionUtil ();
11          use Apache2::RequestRec     ();
12
13          # grab the connection object;
14          my $c = $r->connection;
15
16          # share perl objects like $r->pnotes
17          $old_val = $c->pnotes($key => $value);
18

Description

20       "Apache2::ConnectionUtil" provides the Apache connection record object
21       utilities API.
22

API

24       "Apache2::ConnectionUtil" provides the following functions and/or meth‐
25       ods:
26
27       "pnotes"
28
29       Share Perl variables between requests over the lifetime of the connec‐
30       tion.
31
32          $old_val  = $c->pnotes($key => $val);
33          $val      = $c->pnotes($key);
34          $hash_ref = $c->pnotes();
35
36       obj: $c ( "Apache2::Connection object" )
37       opt arg1: $key ( string )
38           A key value
39
40       opt arg2: $val ( SCALAR )
41           Any scalar value (e.g. a reference to an array)
42
43       ret: (3 different possible values)
44           if both, $key and $val are passed the previous value for $key is
45           returned if such existed, otherwise undef is returned.
46
47           if only $key is passed, the current value for the given key is
48           returned.
49
50           if no arguments are passed, a hash reference is returned, which can
51           then be directly accessed without going through the "pnotes()"
52           interface.
53
54       since: 2.0.3
55
56       See ("Apache2::RequestUtil::pnotes") for the details of the "pnotes"
57       method usage.  The usage is identical except for a few differences.
58       First is the use of $c instead of $r as the invocant.  The second is
59       that the the data persists for the lifetime of the connection instead
60       of the lifetime of the request.  If the connection is lost, so is the
61       data stored in "pnotes".
62

See Also

64       Apache2::Connection.
65
66       Apache2::RequestUtil::pnotes.
67
68       mod_perl 2.0 documentation.
69
71       mod_perl 2.0 and its core modules are copyrighted under The Apache
72       Software License, Version 2.0.
73

Authors

75       The mod_perl development team and numerous contributors.
76
77
78
79perl v5.8.8                       2006-11-d1o9cs::api::Apache2::ConnectionUtil(3)
Impressum