> > - a lot of times people use references to other > > structures when they should subclass... these references > > function only to re-map arguments to other modules, > > which is ridiculous. > > > Careful on the should. It can seem extra and possibly > confusing but isn't always. Delegation is a valid pattern > that is cleaner than inheriting at times, particularly > when you're mixing in a few different modules at the same > time to do something. If you're merely extending an > existing, then yes, inheritance is good. > Multi-directional multi-inheritance can get really > messy... (as I dug myself out of in development recently > myself) if you haven't read, at least scan...
Regarding your comment about inheritance vs. references - something I hadn't thought much about. A) I need to prefix all my internal method names with 'a2c_' to stay out of the controller namespace. B) You can't have any controller subroutines with the same names as anything in the Apache2::Request* family, which (slightly) limits your choice of allowable URL's. But I think it's worth it so that '$self' is the Apache object. What do people think? I wonder how easy it would be to add controller subroutine attributes for which ones are allowed or not, ala Catalyst, instead of the controller having to provide an 'allowed_methods' method. Mark