Quoting Greg Marr <[EMAIL PROTECTED]>:
> At 03:41 PM 05/06/2002, Jesse Erlbaum wrote:
> > > What about having $self->current_rm() as an object function
> > instead of
> > > passing it around into and out of sub-routines?
> > >
> > > then you could get the rm:
> > > my $rm = $self->current_rm();
> > >
> > > and change the rm:
> > > $self->current_rm( $rm );
>
> I thought this sounded bad at first, but the more I think about it,
> the less unreasonable it seems. This is really no different than the
> existing functions run_modes() and mode_param(), which only have
any
> effect up until the point that the run mode is chosen. Changing
> either of these in the run-mode has no chance of changing the
> selected run mode. I'm starting to like this much better than having
> to return a value that was passed to the function in order to make
> the simple addition of the function not completely break your
> application.
>
I agree with Greg here. I think the cgiapp_prerun() should not _have_ to
return the run-mode, but it would be the apropriate place to change it if
you wanted to.
It seems to me that a rule is being broken in OOD somewhere here if you
are passing an argument just to rely on receiving it back. Sounds like a
coupling issue. But then again, I'm quiet really rusty on OOD (where's my
Brady Booch book when I need it?!?)
I'm not sure how best to go about this problem, but I'm beginning to like
Steve Comrie's idea. Either that or the
$self->param('CGIAPP_RUNMODE') interface. They both factor out
functionality from cgiapp_prerun() that doesn't need to be there.
-spencer christensen
[EMAIL PROTECTED]
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/[email protected]/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]