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 ExtUtils::MM_Any.pm, 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 ExtUtils::MM_Any.pm 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:
- 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.
- 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?
- A bonus question: there is a copy of ExtUtils::MakeMaker.pm and ExtUtils::MM.pm 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.)
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.