Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

errors with cpan/ExtUtils-MakeMaker/t/basic.t

by billr1 (Initiate)
on May 13, 2016 at 20:54 UTC ( #1162996=perlquestion: print w/replies, xml ) Need Help??

billr1 has asked for the wisdom of the Perl Monks concerning the following question:

I'm trying to track down some errors I am seeing when running several on the tests in cpan/ExtUtils-MakeMaker/t. This is using Perl 5.22.1, cross-compiled from x86_64 to x86_64, running in a qemu target. As an example, the t/basic.t test contains:

use ExtUtils::MakeMaker; : : use Config; use Test::More; use ExtUtils:MM; plan !MM->can_run(make()) && $ENV{PERL_CORE} && $Config{'usecrosscompi +le'} ? (skip_all => "cross-compiling and make not available") : (tests => 171); use File::Find; : :

I am finding that the call MM->can_run(make()) returns undef. make() is defined in, but it appears to never be called. In addition, make() relies on the value of $self->MAKE, which is set in init_MAKE(), also defined in and never called.

Now, I can get this code to work by changing it to look like this:

my $mm = ExtUtils::MM->new(); plan !$mm->can_run($mm->make()) && ...

(init_MAKE() gets called from new(), to set the internal value for MAKE which is used when make() is called.)

So, my questions are:

  1. How is this intended to work and why did it presumably work when originally written and committed? IOW, my perl knowledge is obviously lacking here.
  2. I notice some other tests use MM->can_run($Config{make}). That would work here, too, but $Config{make} could be different than the value returned by make(); does that really matter here?
  3. A bonus question: there is a copy of and in cpan/ExtUtils-MakeMaker/lib, as well as the system library. Do these tests expect to be using the local copy lib or the system copy? (Currently they are picking up the ones in the system library.)

Replies are listed 'Best First'.
Re: errors with cpan/ExtUtils-MakeMaker/t/basic.t
by Anonymous Monk on May 13, 2016 at 22:53 UTC

    This is using Perl 5.22.1

    5.22.1 comes with makemaker 7.04_01, if the test failures bother you, replace it with the newest version available (7.16) from cpan, maybe using

    1. How is this intended to work...

    Don't worry about it, if you wish, report test failures to the maintainers, and then you're done

    2. does that really matter here?

    Don't worry about it, you're not a makemaker maintainer, or a perl5-porter, its not worth looking into

    3.Do these tests expect to be using the local copy lib or the system copy? (Currently they are picking up the ones in the system library.)

    Don't worry about it, tests rarely explain/document their expectations, the maintainers will know what to do....

    You can always diff against the latest current version of the tests .... but hasn't changed in all that time

      ++. Nice answer.

      Thanks, I will contact the maintainers and maybe try makemaker 7.16 to see if the errors are still present.
Re: errors with cpan/ExtUtils-MakeMaker/t/basic.t
by Haarg (Curate) on May 15, 2016 at 04:03 UTC

    The make sub it is calling comes from MakeMaker::Test::Utils, which is in t/lib.

    How are you trying to run this test, and what errors are you getting? It would seem that the check is meant for exactly the case of when you are cross compiling perl, and having that check return undef would lead to the test script skipping itself.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1162996]
Approved by choroba
Front-paged by stevieb
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (7)
As of 2020-11-30 11:18 GMT
Find Nodes?
    Voting Booth?

    No recent polls found