MM_Unix.pm : work around File::Find problem on VMS
[p5sagit/p5-mst-13.2.git] / lib / ExtUtils / Command / MM.pm
CommitLineData
f6d6199c 1package ExtUtils::Command::MM;
2
3use strict;
4
57b1a898 5require 5.005_03;
f6d6199c 6require Exporter;
7use vars qw($VERSION @ISA @EXPORT);
8@ISA = qw(Exporter);
9
10@EXPORT = qw(test_harness);
11$VERSION = '0.01';
12
13=head1 NAME
14
15ExtUtils::Command::MM - Commands for the MM's to use in Makefiles
16
17=head1 SYNOPSIS
18
19 perl -MExtUtils::Command::MM -e "function" files...
20
21
22=head1 DESCRIPTION
23
24B<FOR INTERNAL USE ONLY!> The interface is not stable.
25
26ExtUtils::Command::MM encapsulates code which would otherwise have to
27be done with large "one" liners.
28
29They all read their input from @ARGV unless otherwise noted.
30
31Any $(FOO) used in the examples are make variables, not Perl.
32
33=over 4
34
35=item B<test_harness>
36
e0678a30 37 test_harness($verbose, @test_libs);
f6d6199c 38
e0678a30 39Runs the tests on @ARGV via Test::Harness passing through the $verbose
40flag. Any @test_libs will be unshifted onto the test's @INC.
f6d6199c 41
45bc4d3a 42@test_libs are run in alphabetical order.
43
f6d6199c 44=cut
45
46sub test_harness {
47 require Test::Harness;
e0678a30 48 require File::Spec;
49
f6d6199c 50 $Test::Harness::verbose = shift;
e0678a30 51
52 local @INC = @INC;
53 unshift @INC, map { File::Spec->rel2abs($_) } @_;
45bc4d3a 54 Test::Harness::runtests(sort { lc $a cmp lc $b } @ARGV);
f6d6199c 55}
56
57=back
58
59=cut
60
611;