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

See Also

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

Authors

74       The mod_perl development team and numerous contributors.
75
76
77
78perl v5.34.0                      2021-07-d2o2cs::api::Apache2::ConnectionUtil(3)
Impressum