Andrew Gianni <[EMAIL PROTECTED]> writes:

> On 10/25/07 5:31 AM, "Harald Joerg" <[EMAIL PROTECTED]>
> wrote:
>
>> sub respond {
>>    # ...du whatever needs to be done in response to the user's request
>>    return 'NextPage';
>> }
>
> Try:
>
> sub respond {
>    my $self = shift;
>    return $self->name_to_page('NextPage');
> }
>
> Or is there some specific reason that you want to just return a string
> instead of an object?

Yes, of course I could do that, and there is no specific reason other
than DWIM.

Writing an extra mantra $self->name_to_page() dozens of times (in
every respond, every module) is sightly annoying and gives me the
impression of a decentralized workaround.

If I write another application, which may be not before next year, I
am sure to stubmle over that again.  It is not in the Linux Mag
examples, not easily collected from the PODs, and not in my own
mod_perl apps.

Currently I've flipped to overriding activate in My::App.pm., and
inserted the autoloading code immediately before the call to
$next_page->control_enter.  For the moment, I like it that way :-)

That's what I like with CGIPH: The code is so slim that it is pretty
easy to understand, hence rather riskless to overload, and TIMTOWTDI!
-- 
Cheers,
haj

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
cgi-prototype-users mailing list
cgi-prototype-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cgi-prototype-users

Reply via email to