Skip Menu |

This queue is for tickets about the WWW-Mechanize-CGI CPAN distribution.

Report information
The Basics
Id: 16000
Status: resolved
Priority: 0/
Queue: WWW-Mechanize-CGI

People
Owner: Nobody in particular
Requestors: chris+rt [...] chrisdolan.net
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.2
Fixed in: (no value)



Subject: cgi_application fails oddly on relative paths
If you pass a relative path to the cgi_application() method, the -f and -x tests pass, but the system() call dies because '.' is not in $PATH. For example: use WWW::Mechanize::CGI; my $mech = WWW::Mechanize::CGI->new(); $mech->cgi_application('index.cgi'); $mech->get('http://localhost'); Fails with: Can't exec "index.cgi": No such file or directory at /Users/chris/perl/lib/perl5/site_perl/WWW/Mechanize/CGI.pm line 42. If I change 'index.cgi' to './index.cgi' then it works. I propose that the code be changed to use File::Spec->rel2abs, or simply document that the path should be absolute. -- Chris
From: Christian Hansen
[CLOTHO - Mon Nov 21 08:46:27 2005]: Show quoted text
> If I change 'index.cgi' to './index.cgi' then it works. I propose > that the code be changed to use File::Spec->rel2abs, or simply > document that the path should be absolute.
Thanks for the report. A fix has been committed in trunk [1] that allows for relative paths. [1] http://dev.catalyst.perl.org/repos/Catalyst/trunk/WWW-Mechanize-CGI/ -- Christian Hansen <ch@ngmedia.com>