Discussion:
[rt.cpan.org #106163] Tests fail under a perlbrew perl
(too old to reply)
shaitand via RT
2015-07-30 22:46:16 UTC
Permalink
Thu Jul 30 18:46:15 2015: Request 106163 was acted upon.
Transaction: Ticket created by shaitand
Queue: PAR
Subject: Tests fail under a perlbrew perl
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: ***@gmail.com
Status: new
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=106163 >


This appears to be because there is a hardcoded /usr/bin/perl shebang line.

#!/usr/bin/env perl

Would be much better since perl installed in alternate locations such as
under /home/perl5 like in perlbrew or /usr/local/bin would be detected via
path.
Karen Etheridge via RT
2015-07-31 00:23:52 UTC
Permalink
Thu Jul 30 20:23:46 2015: Request 106163 was acted upon.
Transaction: Correspondence added by ETHER
Queue: PAR
Subject: Tests fail under a perlbrew perl
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: ***@gmail.com
Status: new
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=106163 >
Post by shaitand via RT
This appears to be because there is a hardcoded /usr/bin/perl shebang line.
#!/usr/bin/env perl
Would be much better since perl installed in alternate locations such as
under /home/perl5 like in perlbrew or /usr/local/bin would be detected via
path.
I don't think this is the problem -- shebang lines are ignored in tests because they are invoked with a specific perl.

/usr/bin/env perl would not be correct in any instance, as that doesn't work on all distributions, and whenever a new perl process is invoked, $^X should be used.

For me, using perlbrew on perl 5.23.1 on darwin, I can run tests just fine, but not install:

: [***@jaeger 1438301697.22865/PAR-Dist-0.49]$; perl Makefile.PL && make test
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for PAR::Dist
Writing MYMETA.yml and MYMETA.json
PERL_DL_NONLAZY=1 "/Volumes/amaretto/Users/ether/perl5/perlbrew/perls/23.1/bin/perl5.23.1" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00pod.t ............ skipped: Set environment variable PERL_TEST_POD=1 to test POD
t/00podcover.t ....... skipped: Set environment variable PERL_TEST_POD=1 to test POD
t/01basic.t .......... ok
t/02parsedistname.t .. ok
t/03merge_meta.t ..... PAR::Dist testers/debug info: Using 'YAML::XS' as YAML implementation at /Volumes/amaretto/Users/ether/.cpanm/work/1438301697.22865/PAR-Dist-0.49/blib/lib/PAR/Dist.pm line 1357.
Using Archive::Zip as ZIP tool.
t/03merge_meta.t ..... ok
All tests successful.
Files=5, Tests=36, 0 wallclock secs ( 0.02 usr 0.01 sys + 0.20 cusr 0.05 csys = 0.28 CPU)
Result: PASS
: [***@jaeger 1438301697.22865/PAR-Dist-0.49]$;
: [***@jaeger 1438301697.22865/PAR-Dist-0.49]$; make install
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ERROR: Can't create '/Volumes/amaretto/Users/ether/perl5/perlbrew/perls/23.1/lib/site_perl/5.23.1/PAR'
mkdir /Volumes/amaretto/Users/ether/perl5/perlbrew/perls/23.1/lib/site_perl/5.23.1/PAR: Permission denied at /Volumes/amaretto/Users/ether/perl5/perlbrew/perls/23.1/lib/5.23.1/ExtUtils/Install.pm line 477.

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
at -e line 1.
make: *** [pure_site_install] Error 13
Roderich Schupp via RT
2015-07-31 08:50:58 UTC
Permalink
Fri Jul 31 04:50:47 2015: Request 106163 was acted upon.
Transaction: Correspondence added by RSCHUPP
Queue: PAR
Subject: Tests fail under a perlbrew perl
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: ***@gmail.com
Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=106163 >
Post by shaitand via RT
This appears to be because there is a hardcoded /usr/bin/perl shebang line.
Please post the output of "make test" instead of making wild guesses.
Even better would be the output of

$ perl Makefile:PL
$ make
$ make test

and

$ perl -v
$ perl -V

Cheers, Roderich

Loading...