diff options
Diffstat (limited to 'cpan/Module-Build/lib/Module/Build.pm')
-rw-r--r-- | cpan/Module-Build/lib/Module/Build.pm | 135 |
1 files changed, 59 insertions, 76 deletions
diff --git a/cpan/Module-Build/lib/Module/Build.pm b/cpan/Module-Build/lib/Module/Build.pm index 224e2456ab..e23375e7df 100644 --- a/cpan/Module-Build/lib/Module/Build.pm +++ b/cpan/Module-Build/lib/Module/Build.pm @@ -10,68 +10,15 @@ 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.3607'; +$VERSION = '0.3622'; $VERSION = eval $VERSION; -# Okay, this is the brute-force method of finding out what kind of -# platform we're on. I don't know of a systematic way. These values -# came from the latest (bleadperl) perlport.pod. - -my %OSTYPES = qw( - aix Unix - bsdos Unix - beos Unix - dgux Unix - dragonfly Unix - dynixptx Unix - freebsd Unix - linux Unix - haiku Unix - hpux Unix - irix Unix - darwin Unix - machten Unix - midnightbsd Unix - mirbsd Unix - next Unix - openbsd Unix - netbsd Unix - dec_osf Unix - nto Unix - svr4 Unix - svr5 Unix - sco_sv Unix - unicos Unix - unicosmk Unix - solaris Unix - sunos Unix - cygwin Unix - os2 Unix - interix Unix - gnu Unix - gnukfreebsd Unix - nto Unix - - dos Windows - MSWin32 Windows - - os390 EBCDIC - os400 EBCDIC - posix-bc EBCDIC - vmesa EBCDIC - - MacOS MacOS - VMS VMS - VOS VOS - riscos RiscOS - amigaos Amiga - mpeix MPEiX - ); # Inserts the given module into the @ISA hierarchy between # Module::Build and its immediate parent @@ -94,18 +41,18 @@ sub _interpose_module { if (grep {-e File::Spec->catfile($_, qw(Module Build Platform), $^O) . '.pm'} @INC) { __PACKAGE__->_interpose_module("Module::Build::Platform::$^O"); -} elsif (exists $OSTYPES{$^O}) { - __PACKAGE__->_interpose_module("Module::Build::Platform::$OSTYPES{$^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 { $OSTYPES{$^O} } +sub os_type { return Perl::OSType::os_type() } -sub is_vmsish { return ((os_type() || '') eq 'VMS') } -sub is_windowsish { return ((os_type() || '') eq 'Windows') } -sub is_unixish { return ((os_type() || '') eq 'Unix') } +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; @@ -121,7 +68,6 @@ testall testcover testdb testpod testpodcoverage versioninstall Module::Build - Build and install Perl modules - =head1 SYNOPSIS Standard process for building & installing modules: @@ -168,7 +114,28 @@ This illustrates initial configuration and the running of three 'actions'. In this case the actions run are 'build' (the default action), 'test', and 'install'. Other actions defined so far include: -<action_list> + build manifest_skip + checkchanges manpages + checkgit pardist + clean patch_blead + code ppd + config_data ppmdist + diff prereq_data + dist prereq_report + distcheck pure_install + distclean realclean + distdir retest + distinstall skipcheck + distmeta tag_git + distsign test + disttest testall + docs testcover + fakeinstall testdb + help testpod + html testpodcoverage + install upload + installdeps versioninstall + manifest You can run the 'help' action for a complete list of actions. @@ -328,6 +295,15 @@ Creates a "distribution directory" named C<$dist_name-$dist_version> copies all the files listed in the F<MANIFEST> file to that directory. This directory is what the distribution tarball is created from. +=item distinstall + +[version 0.37] + +Performs the 'distdir' action, then switches into that directory and runs a +C<perl Build.PL>, followed by the 'build' and 'install' actions in that +directory. Use PERL_MB_OPT or F<.modulebuildrc> to set options that should be +applied during subprocesses + =item distmeta [version 0.21] @@ -337,17 +313,13 @@ Creates the F<META.yml> file that describes the distribution. F<META.yml> is a file containing various bits of I<metadata> about the distribution. The metadata includes the distribution name, version, abstract, prerequisites, license, and various other data about the -distribution. This file is created as F<META.yml> in YAML format. -It is recommended that the C<YAML::Tiny> module be installed to create it. -If the C<YAML::Tiny> module is not installed, an internal module supplied -with Module::Build will be used to write the META.yml file, and this -will most likely be fine. +distribution. This file is created as F<META.yml> in a simplified YAML format. F<META.yml> file must also be listed in F<MANIFEST> - if it's not, a warning will be issued. -The current version of the F<META.yml> specification can be found at -L<http://module-build.sourceforge.net/META-spec-current.html> +The current version of the F<META.yml> specification can be found +on CPAN as L<CPAN::Meta::Spec>. =item distsign @@ -361,9 +333,11 @@ MANIFEST. [version 0.05] -Performs the 'distdir' action, then switches into that directory and -runs a C<perl Build.PL>, followed by the 'build' and 'test' actions in -that directory. +Performs the 'distdir' action, then switches into that directory and runs a +C<perl Build.PL>, followed by the 'build' and 'test' actions in that directory. +Use PERL_MB_OPT or F<.modulebuildrc> to set options that should be applied +during subprocesses + =item docs @@ -473,6 +447,14 @@ add your own stuff to it: See the L<distcheck> and L<skipcheck> actions if you want to find out what the C<manifest> action would do, without actually doing anything. +=item manifest_skip + +[version 0.3608] + +This is an action intended for use by module authors, not people +installing modules. It will generate a boilerplate MANIFEST.SKIP file +if one does not already exist. + =item manpages [version 0.28] @@ -734,7 +716,8 @@ Suppress informative messages on output. =item verbose -Display extra information about the Build on output. +Display extra information about the Build on output. C<verbose> will +turn off C<quiet> =item cpan_client @@ -1117,10 +1100,10 @@ modify it under the same terms as Perl itself. =head1 SEE ALSO perl(1), L<Module::Build::Cookbook>, L<Module::Build::Authoring>, -L<Module::Build::API>, L<ExtUtils::MakeMaker>, L<YAML::Tiny> +L<Module::Build::API>, L<ExtUtils::MakeMaker> F<META.yml> Specification: -L<http://module-build.sourceforge.net/META-spec-current.html> +L<CPAN::Meta::Spec> L<http://www.dsmit.com/cons/> |