Dear Monks,

I have a project at work that involves a large C++ program which calls embedded perl and uses many perl modules in other directories. The boss required that the project be testable with a ExtUtils::MakeMaker "make test". He also required that I start with files generated by h2xs.

I have created a dummy module 'Xyz.pm' in the working directory, and forced MakeMaker to ignore everything else, like this:

use ExtUtils::MakeMaker; # See lib/ExtUtils/MakeMaker.pm for details of how to influence # the contents of the Makefile that is written. WriteMakefile( 'NAME' => 'Xyz', 'VERSION_FROM' => 'Xyz.pm', # finds $VERSION 'PREREQ_FATAL' => 1, # force prereq checks 'PREREQ_PM' => { 'DateTime' => '0', # X ? # # more prerequisites here, generated with /scandeps.pl }, # e.g., Module::Name => 1.1 'PREFIX' => '~/xyz_dummy', # shanghai install for now ); package MY; # Drastic fix for pulling the world into blib: eliminate all but Xyz.p +m sub libscan { my $self = shift; my $file = shift; return $file !~ /Xyz\.pm/ ? 0 : $self->SUPER::libscan($file); }
I put several test scripts (using Test::More) down into a "t/" directory, and now I can use the regular "perl Makefile.PL; make; make test" to do testing without disturbing the rest of the project.

Does anyone have suggestions on how I could improve this testing environment? Thanks.


In reply to MakeMaker for testing only by tall_man

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.