Subject: | Persistent environment bug - mode_param() and path_info() |
Date: | Fri, 16 Nov 2012 16:36:00 -0200 |
To: | bug-CGI-Application [...] rt.cpan.org |
From: | Vinicius Mello <vmmello [...] vmmello.eti.br> |
Hi,
I'd like to report a bug when using path_info to determine
the current run mode in a persistent environment like
FastCGI. I'm using CGI::Application 4.50.
Running in a content like:
my $app = MyCgiApp->new(# args...);
while(my $cgi = CGI::Fast->new) {
$app->query($cgi);
eval { $app->run(); };
# ...
}
When using path_info as argument to mode_param() in setup(),
the mode_param() function called by ->run() always returns
the value of the first request.
The problem is that the mode_param() function when called
without arguments returns the existing value of
$self->{__MODE_PARAMS}. Though the conditions that match
path_info() are never matched.
I've attached a small suggested patch to solve this problem.
Thanks in advance,
--
Vinicius Mello
Message body is not shown because sender requested not to inline it.