perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Ludwig <>
Subject Usefulness of $r->notes and $r->pnotes (or $c)
Date Tue, 23 Mar 2010 21:28:01 GMT
Let me bore you some more.

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

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

milu@colinux:~ > perl 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

View raw message