Mark Stosberg wrote:
>>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.
> 
> 
> I don't recall why there is no setup hook. Maybe Cees or Micheal Graham
> understand why this is the case. 
> 
> 
>>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?
> 
> 
> Could this be addressed by patching C::A so these calls:
> 
>  $self->start_mode('start');
> 
> Become:
> 
>  $self->start_mode('start') unless defined $self->start_mode();

Yeah, that's one way of doing it. The other would be to just remove the
line $self->start_mode('start') in setup() since it's completely
redundant anyway. But I would still change the line in new() to do as
you have proposed just incase someone choose to set it in an init
callback (like I did :)

-- 
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]

Reply via email to