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

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



Ron Savage wrote:
> Hi Michael
> 
> (3)
> Line 168:
> unless(defined $ENV{PATH_INFO}) {
> croak "reality checked failed: PATH_INFO is not defined in the
> environment"; }
> 
> (I assume checked is a typo for check)
> 
> but in the docs you say:
> 
> PATH_INFO Parsing
> This section will describe how the application module and run mode
> are determined from the PATH_INFO if no DISPATCH TABLE is present,
> and what options you have to customize the process.
> 
> But what if a dispatch table /is/ present? Why should path_info be
> checked if I supply a table? Here's my scipt:

A dispatch table doesn't replace the PATH_INFO parsing. It just customizes it
further. If there is no PATH_INFO, how can a request be dispatched? We can't use
the full URL since different portions may be mapped to different locations of
the web server.

The PATH_INFO is the portion of the URL leftover after the server has decided
how it should serve the request. Every webserver that I know of set's PATH_INFO
even if it's set to an empty string.

> #!/usr/bin/perl
> 
> use CGI::Application::Dispatch;
> 
> CGI::Application::Dispatch -> dispatch
> (
> 	prefix        => 'X::Y',
> 	table        =>
> 	[
> 		''                        => {app => 'application', rm => 'requestor'},
> 		':app/:rm'        => {app => 'application'},
> 	],
> );
> 
> It dies with the above error. That doesn't seem right to me.

Are you running this under a webserver or the command line?

-- 
Michael Peters
Developer
Plus Three, LP


---------------------------------------------------------------------
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.