>      my $self = shift;
>      my $cgi = $self->query();
>    Based on the setup code you provided, you would have to change this in your
> run modes to look like this:
>      my $self = shift;
>      my $cgi = $self->param('cgi');
>
>    But that's just doing the same thing.  Except in your case, you're just

True, unless he subclasses his application module and wants to twiddle
the data passed by the user before he calls a subroutine on it.

While I don't tend to put the entire query into a param(), I do usually
have an initialize() routine that puts the data I expect into params(),
and all of my subroutines look there for them.  I also tend to try and
write my modules to maximize inheritance a lot.

Now, 9 out of 10 times, I don't subclass those modules, but the habits
mean that that 10th time is a breeze.  There's nothing like needing ALMOST
the same action, and being able to subclass with a 5 line subroutine
change to do it, and even automagically handle updates to the base code,
since it's inheriting and not just a changed copy.




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

Reply via email to