[rt.cpan.org #106163] Tests fail under a perlbrew perl

[email protected] ("Karen Etheridge via RT")
Newsgroups perl.par
Message-ID <[email protected]>
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: [email protected]
      Status: new
 Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=106163 >


On 2015-07-30 15:46:15, shaitand wrote:
> 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:

: [ether@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
: [ether@jaeger 1438301697.22865/PAR-Dist-0.49]$; 
: [ether@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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.