mod_perl logo perl icon
previous page: Apache2::Connection - Perl API for Apache connection objectpage up: mod_perl 2.0 APInext page: Apache2::Const - Perl Interface for Apache Constants

Apache2::ConnectionUtil - Perl API for Apache connection utils






mod_perl2 User's Guide

mod_perl2 User's Guide

By Stas Bekman, Jim Brandt
Practical mod_perl

Practical mod_perl

By Stas Bekman, Eric Cholet
The mod_perl Developer's Cookbook

The mod_perl Developer's Cookbook

By Geoffrey Young, Paul Lindner, Randy Kobes
mod_perl Pocket Reference

mod_perl Pocket Reference

By Andrew Ford
Writing Apache Modules with Perl and C

Writing Apache Modules with Perl and C

By Lincoln Stein, Doug MacEachern
Embedding Perl in HTML with Mason

Embedding Perl in HTML with Mason

By Dave Rolsky, Ken Williams


Table of Contents

Synopsis

   use Apache2::Connection     ();
   use Apache2::ConnectionUtil ();
   use Apache2::RequestRec     ();

   # grab the connection object;
   my $c = $r->connection;

   # share perl objects like $r->pnotes
   $old_val = $c->pnotes($key => $value);


TOP

Description

Apache2::ConnectionUtil provides the Apache connection record object utilities API.



TOP

API

Apache2::ConnectionUtil provides the following functions and/or methods:



TOP

pnotes

Share Perl variables between requests over the lifetime of the connection.

   $old_val  = $c->pnotes($key => $val);
   $val      = $c->pnotes($key);
   $hash_ref = $c->pnotes();

See (Apache2::RequestUtil::pnotes) for the details of the pnotes method usage. The usage is identical except for a few differences. First is the use of $c instead of $r as the invocant. The second is that the the data persists for the lifetime of the connection instead of the lifetime of the request. If the connection is lost, so is the data stored in pnotes.



TOP

See Also

Apache2::Connection.

Apache2::RequestUtil::pnotes.

mod_perl 2.0 documentation.



TOP

Copyright

mod_perl 2.0 and its core modules are copyrighted under The Apache Software License, Version 2.0.



TOP

Authors

The mod_perl development team and numerous contributors.






TOP
previous page: Apache2::Connection - Perl API for Apache connection objectpage up: mod_perl 2.0 APInext page: Apache2::Const - Perl Interface for Apache Constants