1 package ExtUtils::MM_Any;
4 use vars qw($VERSION @ISA);
13 ExtUtils::MM_Any - Platform agnostic MM methods
17 FOR INTERNAL USE ONLY!
19 package ExtUtils::MM_SomeOS;
21 # Temporarily, you have to subclass both. Put MM_Any first.
22 require ExtUtils::MM_Any;
23 require ExtUtils::MM_Unix;
24 @ISA = qw(ExtUtils::MM_Any ExtUtils::Unix);
28 B<FOR INTERNAL USE ONLY!>
30 ExtUtils::MM_Any is a superclass for the ExtUtils::MM_* set of
31 modules. It contains methods which are either inherently
32 cross-platform or are written in a cross-platform manner.
34 Subclass off of ExtUtils::MM_Any I<and> ExtUtils::MM_Unix. This is a
37 B<THIS MAY BE TEMPORARY!>
39 =head1 Inherently Cross-Platform Methods
41 These are methods which are by their nature cross-platform and should
42 always be cross-platform.
44 =head2 File::Spec wrappers B<DEPRECATED>
46 The following methods are deprecated wrappers around File::Spec
47 functions. They exist from before File::Spec did and in fact are from
48 which File::Spec sprang.
50 They are all deprecated. Please use File::Spec directly.
60 return File::Spec->canonpath(@_);;
69 return File::Spec->catdir(@_);
78 return File::Spec->catfile(@_);
85 my $Curdir = File::Spec->curdir;
90 =item file_name_is_absolute
94 sub file_name_is_absolute {
96 return File::Spec->file_name_is_absolute(@_);
104 return File::Spec->path();
111 my $Rootdir = File::Spec->rootdir;
120 my $Updir = File::Spec->updir;
127 =head1 Thought To Be Cross-Platform Methods
129 These are methods which are thought to be cross-platform by virtue of
130 having been written in a way to avoid incompatibilities.
134 =item test_via_harness
136 my $command = $mm->test_via_harness($perl, $tests);
138 Returns a $command line which runs the given set of $tests with
139 Test::Harness and the given $perl.
141 Used on the t/*.t files.
145 sub test_via_harness {
146 my($self, $perl, $tests) = @_;
148 return qq{\t$perl "-MExtUtils::Command::MM" }.
149 qq{"-e" "test_harness(\$(TEST_VERBOSE), '\$(INST_LIB)', '\$(INST_ARCHLIB)')" $tests\n};
152 =item test_via_script
154 my $command = $mm->test_via_script($perl, $script);
156 Returns a $command line which just runs a single test without
157 Test::Harness. No checks are done on the results, they're just
160 Used for test.pl, since they don't always follow Test::Harness
165 sub test_via_script {
166 my($self, $perl, $script) = @_;
167 return qq{\t$perl "-I\$(INST_LIB)" "-I\$(INST_ARCHLIB)" $script\n};
174 Michael G Schwern <schwern@pobox.com> with code from ExtUtils::MM_Unix
175 and ExtUtils::MM_Win32.