[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cgiapp] Re: Q: CGI::Application::Dispatch V 2.00_03


On 2006-02-13, Ron Savage <suppressed> wrote:
> Hi Michael
>
> I'm beginning to understand this neat module, and have a couple of comments:
>
> (1)
> Line 330:
>     $app->mode_param(sub { return $rm }) if( $rm );
>
> What happens in my apps when I already have sub setup containing:
>
> 	$self -> mode_param(\&setup_mode);

Right now, your app breaks. Here's how I solved it for my own case,
which could be come a more formal part of the dispatcher. 

I added a default param to the dispatcher of

    using_dispatcher_p => 1,

( _p denotes a boolean ). 

Then in my superclass:
 
 # Work with or withour dispatcher
 unless ($self->param('using_dispatcher_p')) {
         $self->mode_param(
            path_info=> 1,
            param =>'rm'
        );
 }

I propose that the dispatcher include a flag like itself, and then 
document an example use like the one above. 

    Mark


---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/suppressed/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.