Hello all, I'm trying to work on a distributed base class of mine (CGI::Application::Search) that I want to slim down and make use of the call back system so that I don't have to tell my users that they need to override me setup(), etc when they want to extend it.
In doing this, I've run into a couple of problems that I would like to toss out and see what others think. First, there is no 'setup' hook. I'm trying to register my run modes in the base class during a hook and setup is the recommended place for this, but there is no equivalent hook. Should it be added? In the meantime, I'm using the init hook but the drawback is that init is called during new() so any init hooks have to be class based, not object based. This doesn't matter in my situation, but it could in others. Second, If I don't implement a setup method then the 'start_mode' get's set twice. Once in new() (line 43) and then once again in the default setup(). Do we really need this? It just seems redundant and actually clobbers any attempt to set a start_mode on my own in my callback at init. The only way I can get around it is to define an empty setup() method. Thoughts? If others agree with me I can make the changes and patches. These are pretty minor and I don't think they will affect the test suite (except to add tests for the new hook), but I'll make sure everything passes :) -- Michael Peters Developer Plus Three, LP --------------------------------------------------------------------- Web Archive: http://www.mail-archive.com/[email protected]/ http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2 To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
