Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can not install using CPANPLUS 0.9160, perl 5.10.1 #15

Closed
martinthurn-LFT opened this issue Nov 16, 2016 · 4 comments
Closed

can not install using CPANPLUS 0.9160, perl 5.10.1 #15

martinthurn-LFT opened this issue Nov 16, 2016 · 4 comments

Comments

@martinthurn-LFT
Copy link

Installing Test::File (1.442)
[MSG] Using cached file '/home/martin/.cpanplus/authors/id/B/BD/BDFOY/CHECKSUMS' on disk; ttl (3600s) is not exceeded
[MSG] Checksum matches for 'Test-File-1.442.tar.gz'
[MSG] Extracting 'Test-File-1.442.tar.gz'
[MSG] Extracted 'Test::File' to '/home/martin/.cpanplus/5.10.1/build/aoDF6d2Ga3/Test-File-1.442'
==> MISSING Signature file! <==
Running [/usr/bin/perl -e use strict; BEGIN { my $old = select STDERR; $|++; select $old; $|++; $0 = shift(@argv); my $rv = do($0); die $@ if $@; } /home/martin/.cpanplus/5.10.1/build/aoDF6d2Ga3/Test-File-1.442/Makefile.PL]...
Use of uninitialized value $makestat in numeric lt (<) at /usr/share/perl5/CPANPLUS/Dist/MM.pm line 413.
Use of uninitialized value $makestat in subtraction (-) at /usr/share/perl5/CPANPLUS/Dist/MM.pm line 414.
[ERROR] File '/home/martin/.cpanplus/5.10.1/build/aoDF6d2Ga3/Test-File-1.442/Makefile' is not readable or does not exist

Key 'file' (/home/martin/.cpanplus/5.10.1/build/aoDF6d2Ga3/Test-File-1.442/Makefile) is of invalid type for 'CPANPLUS::Dist::MM::_find_prereqs' provided by CPANPLUS::Dist::MM::prepare at /usr/share/perl5/CPANPLUS/Module.pm line 823.
[ERROR] Unable to scan '/home/martin/.cpanplus/5.10.1/build/aoDF6d2Ga3/Test-File-1.442/Makefile' for prereqs

[ERROR] Unable to create a new distribution object for 'Test::File' -- cannot continue

@briandfoy
Copy link
Owner

Noted, but my first suspicion is that this is a problem with CPANPLUS. Can you run the Makefile.PL manually?

@martinthurn-LFT
Copy link
Author

Hmm, yes, manual installation steps run smoothly and easily.

@briandfoy
Copy link
Owner

briandfoy commented Nov 18, 2016

I was able to reproduce this on perl5.10.1 and CPANPLUS 0.9160. I've also been able to make it work by getting rid of:

-e use strict; BEGIN { my $old = select STDERR; $|++; select $old; $|++; $0 = shift(@ARGV); my $rv = do($0); die $@ if $@; }

The problem here is the do(). The Makefile.PL here is a modulino (https://www.masteringperl.org/2015/01/makefile-pl-as-a-modulino/). If you load it as a module, it doesn't execute. You're supposed to run Makefile.PL as a script.

Starting in CPANPLUS 0.76, there was a perlwrapper feature and it was apparently configurable. In CPANPLUS-0.9158, released this May after seven years of no updates, changed this to a constant. The cpanp_run_perl script what used to be the value of perlwrapper is basically the same thing as that command line.

CPANPLUS does this as a kludge to set auto flushing on the filehandles. I think there's probably a better way to do what it wants to do while avoiding the do. Perhaps exec.

I get too much benefit from my modulino approach, and neither cpan nor cpanm have this issue.

@martinthurn-LFT
Copy link
Author

Fair enough. Thank you so much for the explanation!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants