Skip Menu |

This queue is for tickets about the CPAN CPAN distribution.

Report information
The Basics
Id: 131313
Status: open
Priority: 0/
Queue: CPAN

People
Owner: Nobody in particular
Requestors: will [...] zyphon.com
Cc:
AdminCc:

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



Subject: Use of uninitialized value / need a valid pathname in CPAN::FirstTime
Using Amazon Linux AMI release 2018.03, when I try to install cpanm (via ansible, inside of a docker bash shell, yeah I know) I get the attached and below error. Interestingly it doesn't seem to be nearly as upset when I do the same thing via ansible's ssh commands instead of locally via the bash shell, so maybe the root cause is a null path somewhere? ``` Use of uninitialized value $_[0] in substitution (s///) at /usr/share/perl5/File/Basename.pm line 341. fileparse(): need a valid pathname at /usr/share/perl5/CPAN/FirstTime.pm line 1354. ``` FYI `cpan --version` outputs ``` /usr/bin/cpan version 1.57 calling Getopt::Std::getopts (version 1.07 [paranoid]), running under Perl version 5.16.3. ``` These are the packages installed immediately prior to trying to install cpanminus: - perl - perl-core - perl-libwww-perl - perl-CGI - perl-Time-Piece - perl-DBI - perl-DBD-MySQL - perl-CPAN - perl-Env - perl-Test-Fatal - gmp-devel - gcc I am going to try just using the perl-App-cpanminus package instead, but the error was such an oddball and my environment is so clean/reproducable I figured it's a good thing to report, because if I didn't have alternatives I'd really be stuck right now.
Subject: err.txt

Message body is not shown because it is too large.

On 2019-12-31 18:20:17, will@zyphon.com wrote: Show quoted text
> Using Amazon Linux AMI release 2018.03, when I try to install cpanm > (via ansible, inside of a docker bash shell, yeah I know) I get the > attached and below error. Interestingly it doesn't seem to be nearly > as upset when I do the same thing via ansible's ssh commands instead > of locally via the bash shell, so maybe the root cause is a null path > somewhere? > > ``` > Use of uninitialized value $_[0] in substitution (s///) at > /usr/share/perl5/File/Basename.pm line 341. > fileparse(): need a valid pathname at > /usr/share/perl5/CPAN/FirstTime.pm line 1354. > ```
Just an idea --- maybe the user's shell could not be detected? Would it help if SHELL=/bin/sh was set before running cpan?
Thanks for your report, Will. And Thanks for your suggestion, Slaven. Other ideas to try: (1) replace cpan App::cpanminus with perl -MCPAN -e 'install App::cpanminus' (2) Upgrade before using CPAN.pm; you could try perl -MCPAN -e shell And in the shell you could say upgrade CPAN App::Cpan (3) Upgrade even more; you could try perl -MCPAN -e upgrade