On Saturday, April 5, 2003, at 09:59 PM, Kip Hampton wrote: <snip>
Can you explain how is using the pnotes table. provided by mod_perl for the explicit purpose of passing around metadata though multi-classed Handlers like AxKit, "a hack" exactly?

Actually, notes and pnotes are "used by Apache modules to pass messages amongst themselves" (from the Apache man page).


This is fine and good, but using pnotes to pass data around _inside_ a single module (AxKit) is a bit of a hack. There's a couple of reasons I think this:

1) It's inefficient - or at the least it makes it very difficult to optimize data handling.
2) It makes the data flow within the system unclear. It's effectively like using a global variable in the code to pass data around in - and we all know global variables are generally bad design.
3) It ties the core of AxKit to the Apache object interface and implementation. If it was ever desired to use AxKit separate from Apache (eg. via CGI or something) then it makes the implementation quite complex as you'd have to reimplement the Apache object completely.


Regards,
Chris


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to