Skip Menu |

This queue is for tickets about the Config-Auto CPAN distribution.

Report information
The Basics
Id: 65019
Status: resolved
Worked: 30 min
Priority: 0/
Queue: Config-Auto

People
Owner: BINGOS [...] cpan.org
Requestors: njh [...] bandsman.co.uk
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.29_02
Fixed in: (no value)



Subject: Doesn't check for $HOME w/ fix
I have been tracking down a problem in a CGI script which causes a lot of entries such as this in error.log: [Sat Jan 22 06:07:21 2011] [error] [client 82.80.249.230] [Sat Jan 22 06:07:21 2011] search.cgi: Use of uninitialized value $_[0] in join or string at /home/nigelhorne/perlmods/lib/perl/5.10/File/Spec/Unix.pm line 95. After much searching I've tracked the problem to this line in Config::Auto::find_file: return $x if -e ($x = catfile($ENV{HOME},$filename)); The problem is the assumption that there is a $HOME environment variable, which isn't true in CGI, coupled with File::Spec::Unix's lack of sanity checking of its arguments. The simple fix is: return $x if ($ENV{HOME} && -e ($x = catfile($ENV{HOME},$filename)));
According to my records this was resolved with the release of version 0.30 https://github.com/jib/config-auto/commit/2e151289f Many thanks.