Alien-ROOT
view release on metacpan or search on metacpan
inc/inc_Module-Build/Module/Build.pm view on Meta::CPAN
package Module::Build;
# This module doesn't do much of anything itself, it inherits from the
# modules that do the real work. The only real thing it has to do is
# figure out which OS-specific module to pull in. Many of the
# OS-specific modules don't do anything either - most of the work is
# done in Module::Build::Base.
use strict;
use File::Spec ();
use File::Path ();
use File::Basename ();
use Perl::OSType ();
use Module::Build::Base;
use vars qw($VERSION @ISA);
@ISA = qw(Module::Build::Base);
$VERSION = '0.4003';
$VERSION = eval $VERSION;
# Inserts the given module into the @ISA hierarchy between
# Module::Build and its immediate parent
sub _interpose_module {
my ($self, $mod) = @_;
eval "use $mod";
die $@ if $@;
no strict 'refs';
my $top_class = $mod;
while (@{"${top_class}::ISA"}) {
last if ${"${top_class}::ISA"}[0] eq $ISA[0];
$top_class = ${"${top_class}::ISA"}[0];
}
@{"${top_class}::ISA"} = @ISA;
@ISA = ($mod);
}
if (grep {-e File::Spec->catfile($_, qw(Module Build Platform), $^O) . '.pm'} @INC) {
__PACKAGE__->_interpose_module("Module::Build::Platform::$^O");
} elsif ( my $ostype = os_type() ) {
__PACKAGE__->_interpose_module("Module::Build::Platform::$ostype");
} else {
warn "Unknown OS type '$^O' - using default settings\n";
}
sub os_type { return Perl::OSType::os_type() }
sub is_vmsish { return Perl::OSType::is_os_type('VMS') }
sub is_windowsish { return Perl::OSType::is_os_type('Windows') }
sub is_unixish { return Perl::OSType::is_os_type('Unix') }
1;
__END__
=for :stopwords
bindoc binhtml destdir distcheck distclean distdir distmeta distsign disttest
fakeinstall html installdirs installsitebin installsitescript installvendorbin
installvendorscript libdoc libhtml pardist ppd ppmdist realclean skipcheck
testall testcover testdb testpod testpodcoverage versioninstall
=head1 NAME
Module::Build - Build and install Perl modules
=head1 SYNOPSIS
Standard process for building & installing modules:
perl Build.PL
./Build
./Build test
./Build install
Or, if you're on a platform (like DOS or Windows) that doesn't require
the "./" notation, you can do this:
perl Build.PL
Build
( run in 1.007 second using v1.01-cache-2.11-cpan-172d661cebc )