> You use notes (or pnotes) when you want a kind of global variable that is
> localised to the request, but also accessible to sub-requests.

It's also useful for caching things that MUST be cleaned up at the end of
the request.  You can put a database handle in pnotes and be confident that
it will get cleared at the end of the request, even if your code dies for
some reason.  It's safer than doing the same thing with a cleanup handler
that manually clears a global.

- Perrin

Reply via email to