Usefulness of $r->notes and $r->pnotes (or $c)

Michael Ludwig <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <20100323212800.GF3932@wladimir>
Let me bore you some more.

First, ModPerl::MethodLookup::lookup_method( $symbol ) is a really great
help for exploring the API!

milu@colinux:~ > perl aplkp.pl notes
There is more than one class with method 'notes'
try one of:
        use Apache2::RequestRec ();
        use Apache2::Connection ();

milu@colinux:~ > perl aplkp.pl pnotes
There is more than one class with method 'pnotes'
try one of:
        use Apache2::RequestUtil ();
        use Apache2::ConnectionUtil ();

Good. Now to the point. We have ->notes and ->pnotes on the request and
connection objects. I've passed some information from mod_perl on to
mod_php5 using the notes table. Cool. I could pass complex data from one
mod_perl handler to the other using the pnotes table. Also cool.

It's all in-process, which is cool. It's all per-request (or, if you
want, per-connection), which sets the scope of its usefulness.

The notes are an APR::Table, the pnotes are a HASH.

What real-life uses have you found for these notes and pnotes?

What could be done at the connection level? Or is this rather too
low-level for run-of-the-mill web applications?

This is by curiosity and to get my imagination going.
-- 
Michael Ludwig
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.