This queue is for tickets about the CPAN CPAN distribution.

Report information
The Basics
Id:
36070
Status:
resolved
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
CHOCOLATE [...] cpan.org
Cc:
AdminCc:

BugTracker
Severity:
Critical
Broken in:
1.9205
Fixed in:
(no value)



Subject: "Can't call method close on an undefined value" error on make install
I was getting the following fatal error on a Solaris 8 box when make install was invoked via the cpan command line tool or the CPAN shell: Running make install Prepending /home/whatever/blah to PERL5LIB for 'install' Can't call method "close" on an undefined value at /usr/local/lib/perl5/5.6.1/CPAN.pm line 8987. The filehandle in question is opened with: "${make_install_make_command} install Module::Name 2>&1 |" which was: "sudo make install Module::Name" on my system. It looks like the CPAN shell runs in a restricted environment. In this case, its PATH only contains: /usr/ucb /bin /usr/bin - and as a result the "make install" command barfed as the system's sudo is contained in /usr/local/bin (as is its make). This is fine, but the error is not reported and the undef return value from FileHandle->new() is unchecked. The patch is trivial: 8979c8979 < my($pipe) = FileHandle->new("$system $stderr |"); ---
Show quoted text
> my($pipe) = FileHandle->new("$system $stderr |") || Carp::croak
("Can't execute $system: $!"); There are other unchecked calls to FileHandle->new() that may or may not suffer from the same problem. Thanks, chocolateboy.
Subject: Re: [rt.cpan.org #36070] "Can't call method close on an undefined value" error on make install
Date: Sun, 25 May 2008 13:29:02 +0200
To: bug-CPAN@rt.cpan.org
From: andreas.koenig.7os6VVqR@franz.ak.mind.de (Andreas J. Koenig)
Show quoted text
>>>>> On Wed, 21 May 2008 07:54:45 -0400, "CHOCOLATE via RT" <bug-CPAN@rt.cpan.org> said:
Show quoted text
> The patch is trivial:
Thanks, applied, and in 1.92_62 -- andreas


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.