Punkish,path_info is going to be interpreted as a cgi parameter, so if you want to feed the path_info parameter to your script, you need to do it as a parameter. In practice, that means:
http:://localhost/~user/myapp/index.cgi?path_info=welcomeFor directing traffic (moving from one page to the next), you will have to provide path_info parameter in some manner.
Also, I think mode_param takes a single string like:
$self->mode_param('path_info');
And run_modes takes a hash of mode names and associated subroutines to
call like:
$self->run_modes(
'welcome' => 'welcome',
'login' => 'login',
....
)
I the stuff above is correct, but someone can correct me if I'm wrong
on this. If you really need to "dispatch" from the path info like you
show below, you could look as CGI::Application::dispatch.
Sean On Dec 9, 2004, at 1:40 AM, punkish wrote:
caution: extreme CGI-App n00b here.
My url is thus
http://localhost/~user/myapp/index.cgi
my extremely simple script is
sub setup {
my $self = shift;
$self->start_mode('welcome');
$self->mode_param(path_info => 1);
$self->run_modes([qw(welcome login verify about)]);
$self->tmpl_path('templates/');
}
sub welcome { blah }
sub login { blah }
..
the PATH_INFO is not being handled correctly as the run_mode keeps on
defaulting to 'welcome' no matter what path_info I provide after
index.cgi. Even if it is ..index.cgi/login or ..index.cgi/about, I see
only 'welcome' almost as if no path_info was provided.
Please tell me what obviously stupid thing I am doing wrong so I may
not tear out my remaining hair.
Many thanks in advance for your patience and kindness.
--
punkish
---------------------------------------------------------------------
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
---------------------------------------------------------------------
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.