From 467298a34215401cdcbb1dded51bc2aba5f1f41c Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Thu, 11 Jun 2015 22:32:06 +0000 Subject: Module-Build-0.4214 --- Build.PL | 148 + Changes | 4091 ++++++++++++++++++++++++ INSTALL | 24 + LICENSE | 1 + MANIFEST | 97 + META.json | 157 + META.yml | 114 + Makefile.PL | 16 + README | 901 ++++++ bin/config_data | 249 ++ contrib/bash_completion.module-build | 39 + inc/MBVersion.pm | 1187 +++++++ inc/Module/Metadata.pm | 759 +++++ inc/Perl/OSType.pm | 174 ++ inc/bootstrap.pl | 47 + lib/Module/Build.pm | 1118 +++++++ lib/Module/Build/API.pod | 2124 +++++++++++++ lib/Module/Build/Authoring.pod | 326 ++ lib/Module/Build/Base.pm | 5688 ++++++++++++++++++++++++++++++++++ lib/Module/Build/Bundling.pod | 147 + lib/Module/Build/Compat.pm | 632 ++++ lib/Module/Build/Config.pm | 59 + lib/Module/Build/Cookbook.pm | 529 ++++ lib/Module/Build/Dumper.pm | 19 + lib/Module/Build/Notes.pm | 332 ++ lib/Module/Build/PPMMaker.pm | 186 ++ lib/Module/Build/Platform/Default.pm | 32 + lib/Module/Build/Platform/MacOS.pm | 151 + lib/Module/Build/Platform/Unix.pm | 72 + lib/Module/Build/Platform/VMS.pm | 522 ++++ lib/Module/Build/Platform/VOS.pm | 33 + lib/Module/Build/Platform/Windows.pm | 318 ++ lib/Module/Build/Platform/aix.pm | 39 + lib/Module/Build/Platform/cygwin.pm | 54 + lib/Module/Build/Platform/darwin.pm | 39 + lib/Module/Build/Platform/os2.pm | 48 + lib/Module/Build/PodParser.pm | 63 + t/00-compile.t | 17 + t/PL_files.t | 86 + t/README.pod | 94 + t/actions/installdeps.t | 45 + t/actions/manifest_skip.t | 54 + t/add_property.t | 94 + t/add_property_array.t | 16 + t/add_property_hash.t | 16 + t/basic.t | 234 ++ t/bundle_inc.t | 222 ++ t/bundled/Software/License.pm | 56 + t/bundled/Tie/CPHash.pm | 194 ++ t/compat.t | 563 ++++ t/compat/exit.t | 53 + t/debug.t | 27 + t/destinations.t | 323 ++ t/ext.t | 161 + t/extend.t | 281 ++ t/files.t | 46 + t/help.t | 263 ++ t/install.t | 230 ++ t/install_extra_target.t | 135 + t/lib/DistGen.pm | 859 +++++ t/lib/MBTest.pm | 314 ++ t/lib/Module/Signature.pm | 11 + t/lib/Software/License/VaporWare.pm | 17 + t/manifypods.t | 158 + t/manifypods_with_utf8.t | 68 + t/metadata.t | 109 + t/metadata2.t | 128 + t/mymeta.t | 170 + t/new_from_context.t | 26 + t/notes.t | 66 + t/par.t | 96 + t/parents.t | 61 + t/perl_mb_opt.t | 62 + t/pod_parser.t | 137 + t/ppm.t | 223 ++ t/properties/dist_suffix.t | 33 + t/properties/license.t | 66 + t/properties/module_name.t | 57 + t/properties/needs_compiler.t | 125 + t/properties/release_status.t | 204 ++ t/properties/requires.t | 54 + t/properties/share_dir.t | 257 ++ t/resume.t | 43 + t/runthrough.t | 201 ++ t/sample.t | 20 + t/script_dist.t | 79 + t/signature.t | 100 + t/test_file_exts.t | 41 + t/test_reqs.t | 52 + t/test_type.t | 74 + t/test_types.t | 174 ++ t/tilde.t | 114 + t/unit_run_test_harness.t | 73 + t/use_tap_harness.t | 94 + t/versions.t | 21 + t/write_default_maniskip.t | 42 + t/xs.t | 217 ++ 97 files changed, 28391 insertions(+) create mode 100644 Build.PL create mode 100644 Changes create mode 100644 INSTALL create mode 100644 LICENSE create mode 100644 MANIFEST create mode 100644 META.json create mode 100644 META.yml create mode 100644 Makefile.PL create mode 100644 README create mode 100644 bin/config_data create mode 100644 contrib/bash_completion.module-build create mode 100644 inc/MBVersion.pm create mode 100644 inc/Module/Metadata.pm create mode 100644 inc/Perl/OSType.pm create mode 100644 inc/bootstrap.pl create mode 100644 lib/Module/Build.pm create mode 100644 lib/Module/Build/API.pod create mode 100644 lib/Module/Build/Authoring.pod create mode 100644 lib/Module/Build/Base.pm create mode 100644 lib/Module/Build/Bundling.pod create mode 100644 lib/Module/Build/Compat.pm create mode 100644 lib/Module/Build/Config.pm create mode 100644 lib/Module/Build/Cookbook.pm create mode 100644 lib/Module/Build/Dumper.pm create mode 100644 lib/Module/Build/Notes.pm create mode 100644 lib/Module/Build/PPMMaker.pm create mode 100644 lib/Module/Build/Platform/Default.pm create mode 100644 lib/Module/Build/Platform/MacOS.pm create mode 100644 lib/Module/Build/Platform/Unix.pm create mode 100644 lib/Module/Build/Platform/VMS.pm create mode 100644 lib/Module/Build/Platform/VOS.pm create mode 100644 lib/Module/Build/Platform/Windows.pm create mode 100644 lib/Module/Build/Platform/aix.pm create mode 100644 lib/Module/Build/Platform/cygwin.pm create mode 100644 lib/Module/Build/Platform/darwin.pm create mode 100644 lib/Module/Build/Platform/os2.pm create mode 100644 lib/Module/Build/PodParser.pm create mode 100644 t/00-compile.t create mode 100644 t/PL_files.t create mode 100644 t/README.pod create mode 100644 t/actions/installdeps.t create mode 100644 t/actions/manifest_skip.t create mode 100644 t/add_property.t create mode 100644 t/add_property_array.t create mode 100644 t/add_property_hash.t create mode 100644 t/basic.t create mode 100644 t/bundle_inc.t create mode 100644 t/bundled/Software/License.pm create mode 100644 t/bundled/Tie/CPHash.pm create mode 100644 t/compat.t create mode 100644 t/compat/exit.t create mode 100644 t/debug.t create mode 100644 t/destinations.t create mode 100644 t/ext.t create mode 100644 t/extend.t create mode 100644 t/files.t create mode 100644 t/help.t create mode 100644 t/install.t create mode 100644 t/install_extra_target.t create mode 100644 t/lib/DistGen.pm create mode 100644 t/lib/MBTest.pm create mode 100644 t/lib/Module/Signature.pm create mode 100644 t/lib/Software/License/VaporWare.pm create mode 100644 t/manifypods.t create mode 100644 t/manifypods_with_utf8.t create mode 100755 t/metadata.t create mode 100644 t/metadata2.t create mode 100644 t/mymeta.t create mode 100644 t/new_from_context.t create mode 100644 t/notes.t create mode 100644 t/par.t create mode 100644 t/parents.t create mode 100644 t/perl_mb_opt.t create mode 100644 t/pod_parser.t create mode 100644 t/ppm.t create mode 100644 t/properties/dist_suffix.t create mode 100644 t/properties/license.t create mode 100644 t/properties/module_name.t create mode 100644 t/properties/needs_compiler.t create mode 100644 t/properties/release_status.t create mode 100644 t/properties/requires.t create mode 100644 t/properties/share_dir.t create mode 100644 t/resume.t create mode 100644 t/runthrough.t create mode 100644 t/sample.t create mode 100644 t/script_dist.t create mode 100644 t/signature.t create mode 100644 t/test_file_exts.t create mode 100644 t/test_reqs.t create mode 100644 t/test_type.t create mode 100644 t/test_types.t create mode 100644 t/tilde.t create mode 100644 t/unit_run_test_harness.t create mode 100644 t/use_tap_harness.t create mode 100644 t/versions.t create mode 100644 t/write_default_maniskip.t create mode 100644 t/xs.t diff --git a/Build.PL b/Build.PL new file mode 100644 index 0000000..21ec0b3 --- /dev/null +++ b/Build.PL @@ -0,0 +1,148 @@ +use 5.006001; +use strict; + +BEGIN { + die "CPANPLUS::Dist::Build version 0.08 or later is required to install Module::Build\n" + if $INC{'CPANPLUS/Dist/Build.pm'} && CPANPLUS::Dist::Build->VERSION lt '0.08'; +} + +# On some platforms (*ahem*, MacPerl 5.6.1) "use lib qw(lib);" doesn't +# find the local "lib" directory, so we use File::Spec to do it properly. +use File::Spec 0.82; +use lib File::Spec->catdir('lib'); # use our self to install +# XXX This doesn't carry over to sub processes +use lib File::Spec->catdir('t', 'bundled'); # use bundled modules +use lib File::Spec->catdir('t', 'lib'); # our utilities + +# bootstrap configure_requires prereqs +BEGIN { do 'inc/bootstrap.pl' } + +# We use Module::Build to test & install itself. +use Module::Build; + +# + +my $build = Module::Build->new( + module_name => 'Module::Build', + license => 'perl', + configure_requires => { + 'CPAN::Meta' => '2.142060', + 'Perl::OSType' => 1, + 'Module::Metadata' => '1.000002', + 'version' => '0.87', + }, + build_requires => { + 'File::Temp' => 0.15, # tmpdir() + fixes + 'Test::More' => 0.49, + 'Test::Harness' => 3.16, # PERL5LIB fixes + 'Parse::CPAN::Meta' => '1.4401', + 'CPAN::Meta::YAML' => 0.003, + }, + # KEEP 'requires' as low as possible and target Build/test/install + # Requirements for authors should be implemented as optional features + requires => { + 'perl' => '5.008000', + 'Data::Dumper' => 0, + 'File::Basename' => 0, + 'File::Compare' => 0, + 'File::Copy' => 0, + 'File::Find' => 0, + 'File::Path' => 0, + 'File::Spec' => ($^O eq 'MSWin32' ? 3.30 : '0.82'), # rel2abs() + 'ExtUtils::CBuilder' => 0.27, # major platform fixes + 'ExtUtils::Install' => 0, + 'ExtUtils::Manifest' => 0, + 'ExtUtils::Mkbootstrap' => 0, + 'ExtUtils::ParseXS' => 2.21, # various bug fixes + 'Cwd' => 0, + 'Text::Abbrev' => 0, + 'Text::ParseWords' => 0, + 'Getopt::Long' => 0, + 'Test::Harness' => 0, + 'CPAN::Meta' => '2.142060', + 'Perl::OSType' => ( $^O eq 'bitrig' ? 1.004 : 1 ), # needs 1.0 API + 'version' => 0.87, # No longer requires M::B + 'Module::Metadata' => 1.000002, # uses version.pm + 'Pod::Man' => 2.17, # utf8 support + }, + recommends => { + 'ExtUtils::Install' => 0.30, + 'ExtUtils::Manifest' => 1.54, # public maniskip() + }, + recursive_test_files => 1, + sign => 0, + create_readme => 1, + create_license => 1, + + # overwrite the M::B that shipped in core + installdirs => ($] >= 5.009004 && $] < 5.011 ? 'core' : 'site'), + + # Some CPANPLUS::Dist::Build versions need to allow mismatches + # On logic: thanks to Module::Install, CPAN.pm must set both keys, but + # CPANPLUS sets only the one + allow_mb_mismatch => ( + $ENV{PERL5_CPANPLUS_IS_RUNNING} && ! $ENV{PERL5_CPAN_IS_RUNNING} ? 1 : 0 + ), + + auto_features => { + dist_authoring => { + description => "Create new distributions", + requires => { + 'Archive::Tar' => 1.09, + }, + recommends => { + 'Pod::Readme' => 0.04, + 'Module::Signature' => 0.21, + }, + }, + license_creation => { + description => "Create licenses automatically in distributions", + requires => { + 'Software::License' => 0.103009 + }, + }, + PPM_support => { + description => "Generate PPM files for distributions", + }, + inc_bundling_support => { + description => "Bundle Module::Build in inc/", + requires => { + 'inc::latest' => 0.500, # split out from Module::Build + 'ExtUtils::Install' => 1.54, # also gets us ExtUtils::Installed 1.999_001 + 'ExtUtils::Installed' => 1.999, # technically 1.999_001 is what's available + }, + }, + manpage_support => { + description => "Create Unix man pages", + requires => {'Pod::Man' => 0 }, + }, + HTML_support => { + description => "Create HTML documentation", + requires => {'Pod::Html' => 0}, + }, + }, + + add_to_cleanup => ['t/Sample/pod2htm*'], + script_files => ['bin/config_data'], + meta_merge => { + resources => { + MailingList => 'mailto:module-build@perl.org', + repository => 'https://github.com/Perl-Toolchain-Gang/Module-Build', + IRC => 'irc://irc.perl.org/#toolchain', + } + }, +); + +$build->create_build_script; +if (-f "META.yml" && ! -f "MYMETA.yml") { # fallback if we don't have CPAN::Meta + require File::Copy; + File::Copy::copy("META.yml", "MYMETA.yml") or warn "Error: $!\n"; + if ( -f 'MYMETA.yml' ) { + warn "Copied META.yml to MYMETA.yml for bootstrapping\n"; + } + else { + warn "Could not copy META.yml to MYMETA.yml. That's odd!\n"; + } +} + +# vim:ts=2:sw=2:et:sta diff --git a/Changes b/Changes new file mode 100644 index 0000000..03c6fe6 --- /dev/null +++ b/Changes @@ -0,0 +1,4091 @@ +Revision history for Perl extension Module::Build. + +0.4214 - Fri Jun 12 00:25:00 CEST 2015 + + - Released 0.42_13 as 0.4214 + +0.42_13 - Sat Jun 6 21:18:24 CEST 2015 + + [BUG FIXES] + + - Handle failure to guess license from key better + + [ENHANCEMENTS] + + - Output data in a stable order [Jérémy Bobbio] + +0.4212 - Sun May 17 00:33:34 CEST 2015 + + [BUG FIXES] + + - Revert "Stop using version->normal(); prefer stringify()" + +0.4211 - Tue Jan 20 01:33:42 CET 2015 + + [BUG FIXES] + + - Fix t/actions/installdeps.t to work on "perl in space" [Ed J] + + - Stop using version->normal(); prefer stringify() [John Peacock] + + [DEPRECATIONS] + + - inc::latest has been split out to a separate distribution on CPAN. + It is an optional prerequisite, only needed for the experimental + bundling feature. + +0.4210 - Mon Sep 1 13:30:29 CEST 2014 + + [BUG FIXES] + + - Fixup CPAN::Meta dependency + + - Handle old releases of CPAN::Meta more gracefully. + +0.4209 - Mon Sep 1 12:24:40 CEST 2014 + + [BUG FIXES] + + - Stop calling UNIVERSAL::isa as a function + + [ENHANCEMENTS] + + - Use CPAN::Meta::Merge for meta_merge + + - Convert with CPAN::Meta::Convert in meta_add + + - Add configure requirements + +0.4208 - Mon Aug 18 21:44:38 CEST 2014 + + [BUG FIXES] + + - Removed missed references to Module::Build::Version + +0.4207 - Sat Aug 16 12:56:59 CEST 2014 + + [BUG FIXES] + + - Fix type installdir -> installdirs [Leon Timmermans, Vitaliy Tokarev] + + [DEPRECATIONS] + + - Module::Build::YAML has been removed + + - Module::Build::ModuleInfo has been removed + + - Module::Build::Version has been removed + + - Get rid of "use vars" + + - Added use warnings to all modules + +0.4206 - Sat Jul 12 14:03:01 CEST 2014 + + [BUG FIXES] + + - Formally declare 5.8 dependency [Karen Etheridge] + + - Fix MBTest to work with new and old versions of Test::Builder [Chad Granum] + + [ENHANCEMENTS] + + - Enable release and author tests during disttest [Leon Timmermans, Alberto Simões] + +0.4205 - Sun Feb 9 17:51:22 CET 2014 + + [BUG FIXES] + + - FIX license code regression for artistic license [Roy Ivy III, Leon Timmermans] + + - Don't swallow ExtUtils::CBuilder loading errors [Matthew Horsfall, Leon Timmermans] + + - Handle testing on cross-compile builds [Brian Fraser] + + - Protect against platforms without getpw{nam,uid} [Brian Fraser] + +0.4204 - Fri Jan 10 00:29:31 CET 2014 + + [BUG FIXES] + + - Map conflicts back to runtime [Leon Timmermans] + + - Use mod2fname whenever it's available [Leon Timmermans, Brian Fraser] + + - Accept custom entries in meta_merge 1.4 + +0.4203 - Wed Nov 27 19:09:05 CET 2013 + + [BUG FIXES] + + - Map recommends back to runtime recommends [Leon Timmermans] + + - Map restrictive license to restricted in meta 2.0 [Leon Timmermans] + +0.4202 - Tue Nov 19 12:48:19 CET 2013 + + [BUG FIXES] + + - Don't merge prereqs from meta to mymeta [Leon Timmermans] + +0.4201 - Mon Nov 18 23:23:25 CET 2013 + + [BUG FIXES] + + - Prefer META.json over META.yml [Leon Timmermans] + +0.4200 - Tue Nov 12 12:39:25 CET 2013 + + - Released 0.40_11 as 0.4200 + +0.40_11 - Wed Nov 6 12:46:59 CET 2013 + + [BUG FIXES] + + - Do not set provides in metadata if no_index is set [Leon Timmermans] + +0.40_10 - Tue Nov 5 12:11:37 CET 2013 + + [BUG FIXES] + + - Lowercase license in fallback logic [Leon Timmermans] + +0.40_09 - Tue Nov 5 00:13:11 CET 2013 + + [ENHANCEMENTS] + + - Converted to using Meta 2.0 + +0.4008 - Mon Nov 4 23:10:54 CET 2013 + + [BUG FIXES] + + - Fix test failing on ancient perls <= 5.8.1 [Peter Rabbitson] + + - Do not set default switches in Test::Harness; not even -w [Leon Timmermans] + + [DOCUMENTATION] + + - Fix a couple more broken links to CPAN::META::Spec that should + have been CPAN::Meta::Spec. [Reported by Mike Doherty] + +0.4007 - Fri Jul 19 13:44:39 CEST 2013 + + [BUG FIXES] + + - Removed undeclared test dependency on parent.pm [Leon Timmermans] + + - Declared dependency on Pod::Man 2.17 for utf8 support [Leon Timmermans] + + - Force generation of man pages in manify_with_utf8.t [Leon Timmermans] + +0.4006 - Thu Jul 18 14:19:49 CEST 2013 + + - Announcement: The Perl5-Porters have decided to remove + Module::Build from the perl core distribution. It will still be + available on CPAN, and development is planned to continue + regardless. + + For more information, see: + + * http://www.nntp.perl.org/group/perl.perl5.porters/2013/05/msg202041.html + * http://blogs.perl.org/users/joel_berger/2013/05/on-the-removal-of-some-core-modules.html + * http://www.dagolden.com/index.php/2140/paying-respect-to-modulebuild/ + * http://perlhacks.com/2013/06/removing-modules-from-core/ + + [BUG FIXES] + + - In the 'installdeps' action, w don't need to check for an + executable bit on the CPAN client, just try executing it. + Otherwise we needlessly fail on e.g. VMS. + + - Actually handle utf8 correctly in utf8-man tests. [Leon Timmermans] + + - Don't clobber standard array/hash attributes in subclasses that + have their own array/hash attributes. [Graham Ollis] + + - We now allow underscores in package names, when extracting the + name & abstract from POD. [Ricardo Signes, Shlomi Fish] + + - When building HTML docs, fix a problem with setting the --htmlroot + argument. [Ken Williams] + + - Lower Test::More dependency in the test metadata, so distgen + output won't mess up console with older Test::More installed. + [Tatsuhiko Miyagawa] + + - Revised detildification on VMS [Craig Berry] + + - Fix run_test_harness for case when $Switches is an empty string + [Victor Efimov, Ken Williams] + + [ENHANCEMENTS] + + - Significantly sped up some tests by not forcing HTML docs to be + built when the user's config doesn't ask for them anyway. + [Ken Williams] + + - The Module::Metadata package was split out from this distro back + in 2010. Removed its regression tests. [Ken Williams] + + - Removed dependence on IO::File, replacing it with safe invocations + of open(). [Sven Dowideit] + + - Added an 'extra_manify_args' parameter to facilitate man pages + containing Unicode. [Joenio Costa] + + - Added an '--html_links 0' argument for the 'html' action, which + can hugely speed things up. The main effect is speeding up the + M::B tests themselves. [Ken Williams] + + - Added continuous integration support for the Module::Build code + itself, through the Travis-CI project + (https://travis-ci.org/). [Tatsuhiko Miyagawa, Olivier Mengué] + + [DOCUMENTATION] + + - Removed suggestion in the INSTALL document to use the Makefile.PL + for installation. Making the Makefile.PL lower-profile in + general. [Ken Williams] + + - Fix link from UpperCase CPAN::META::Spec to CPAN::Meta::Spec in + API.pod. [Sven Dowideit] + + [OTHER] + + - Removed unused platform specific modules that never contained + anything. [Leon Timmermans] + + - Lots of typo fixes in comments & documentation. [David Steinbrunner] + + +0.4005 - Thu Apr 25 15:10:14 CEST 2013 + + [ENHANCEMENTS] + + - Added --pureperl-only support + + [BUG FIXES] + + - #72176: pod2html will fail with an empty podpath in some cases. [Phillip Moore] + + - Fix links between modules in HTML docs output [Michael Wild, Leon Timmermans] + +0.4004 - Fri Mar 29 15:05:00 CET 2013 + + [BUG FIXES] + + - Minor VMS fix for @INC [Craig Berry] + + [ENHANCEMENTS] + + - test_requires support has been added [Matsuno Tokuhiro] + +0.4003 - Sat Aug 18 11:17:49 CEST 2012 + + [BUG FIXES] + + - Get rid of outdated metadata tests [Steve Hay] + +0.4002 - Fri Jul 27 20:04:09 EEST 2012 + + [BUG FIXES] + + - Test for TAP::Harness version properly [Leon Timmermans] + + - Install to 'site' on 5.12+ [Leon Timmermans] + + [DOCUMENTATION] + + - Document extra_{compiler|linker}_flags accessors [Nick Wellnhofer] + +0.4001 - Tue Jun 26 20:54:15 CEST 2012 + [BUG FIXES] + + - Parse Pod name a litte more leniently [Paul Evans] + + [DOCUMENTATION] + + - Various spelling fixes [Leon Timmermans, Jonathan Yu] + + - Fixes configuration keys used for script location [Leon Timmermans, reported by Samuel Ferencik] + + [OTHER] + + - use warnings + +0.40 - Fri Feb 24 18:47:48 CET 2012 + + - Released 0.39_02 as 0.40 without any code changes + +0.39_02 - Thu Feb 17 00:33:18 MET 2012 + + [BUG FIXES] + + - Fixed bug where modules without $VERSION might have a version of '0' + listed in 'provides' metadata, which will be rejected by PAUSE + [David Golden, reported by Christopher Fields] + + - Fixed bug in PodParser to allow numerals in module names + [Tokuhirom] + + - Fixed bug where giving arguments twice led to them becoming arrays, + resulting in install paths like "ARRAY(0xdeadbeef)/lib/Foo.pm" + [Leon Timmermans] + + [DOCUMENTATION] + + - Fixed deviance from alphabetical order in documentation of + constructor parameters. [Eric Brine] + + - Add documentation for configure_requires constructor parameter. + [Eric Brine] + + - Change some of the docs' language describing relationship to + MakeMaker. [Ken Williams] + + [OTHER] + + - List Perl-Toolchain-Gang repo as official repo + +0.39_01 - Thu Jul 21 16:48:48 EDT 2011 + + [BUG FIXES] + + - Fixed bug with a nested directory named 'share' inside a ShareDir + (RT#68585) [David Golden] + + - Fixed failing tilde.t when run under UID without passwd entry + (RT#67893) [Dominic Hargreaves] + + [DOCUMENTATION] + + - Fixed typo in Module::Build (RT#67008) [David Golden] + + [OTHER] + + - Pod to HTML internals changed to support new Pod::Html work + in the Perl core + +0.3800 - Sat Mar 5 15:11:41 EST 2011 + + Summary of major changes since 0.3624: + + [ENHANCEMENTS] + + - Generates META.json and MYMETA.json consistent with version 2 of the + CPAN Meta Spec. [David Golden] + + Also in this release: + + [BUG FIXES] + + - Autogenerated documentation no longer includes private actions from + Module::Build's own release subclass. [Report by Timothy Appnel, + fix by David Golden] + +0.37_06 - Mon Feb 28 21:43:31 EST 2011 + + [BUG FIXES] + + - prerequisites with the empty string instead of a version are + normalized to "0". (RT#65909) + + [OTHER] + + - More Pod typo/link fixes [Hongwen Qiu] + +0.37_05 - Sat Feb 19 20:43:23 EST 2011 + + [BUG FIXES] + + - fixes failing ppm.t in perl core + + [OTHER] + + - Pod typo fixes [Hongwen Qiu] + +0.37_04 - Wed Feb 16 15:27:21 EST 2011 + + [OTHER] + + - moved scripts/ to bin/ for less confusing porting to bleadperl + +0.37_03 - Wed Feb 16 09:54:05 EST 2011 + + [BUG FIXES] + + - removed an irrelevant test in t/actions/installdeps.t that was causing + failures on some Cygwin platforms + + [OTHER] + + - dropped configure_requires as some CPAN clients apparently get + confused by having things in both configure_requires and requires + + - bumped Parse::CPAN::Meta build prereq to 1.4401 + + - bumped CPAN::Meta prereq to 2.110420 + + - Pod typo fixes [Hongwen Qiu] + +0.37_02 - Mon Feb 7 21:05:30 EST 2011 + + [BUG FIXES] + + - bumped CPAN::Meta prereq to 2.110390 to avoid a regression in 2.110360 + +0.37_01 - Thu Feb 3 03:44:38 EST 2011 + + [ENHANCEMENTS] + + - Generates META.json and MYMETA.json consistent with version 2 of the + CPAN Meta Spec. [David Golden] + + [BUG FIXES] + + - t/signature.t now uses a mocked Module::Signature; this should be + more robust across platforms as it only needs to confirm that + Module::Build is calling Module::Signature when expected + + [OTHER] + + - Added CPAN::Meta and Parse::CPAN::Meta to prerequisites and dropped + CPAN::Meta::YAML + +0.3624 - Thu Jan 27 11:38:39 EST 2011 + + - Fixed pod2html directory bugs and fixed creation of spurious blib + directory in core perl directory when running install.t (RT#63003) + [Chris Williams] + +0.3623 - Wed Jan 26 17:45:30 EST 2011 + + - Fixed bugs involving bootstrapping configure_requires prerequisites + on older CPANPLUS clients or for either CPAN/CPANPLUS when using + the compatibility Makefile.PL + + - Added diagnostic output when configure_requires are missing for + the benefit of users doing manual installation + +0.3622 - Mon Jan 24 21:06:50 EST 2011 + + - No changes from 0.36_21 + +0.36_21 - Fri Jan 21 11:01:28 EST 2011 + + - Changed YAML::Tiny references to the new CPAN::Meta::YAML module + instead, which is the YAML-variant that is going into the Perl core + +0.36_20 - Fri Dec 10 15:36:03 EST 2010 + + *** DEPRECATIONS *** + + - Module::Build::Version has been deprecated. Module::Build now depends + directly upon version.pm. A pure-perl version has been bundled in inc/ + solely for bootstrapping in case configure_requires is not supported. + M::B::Version remains as a wrapper around version.pm. + + - Module::Build::ModuleInfo has been deprecated. Module::Build now + depends directly upon Module::Metadata (which is an extraction of + M::B::ModuleInfo intended for general reuse). A pure-perl version has + been bundled in inc/ solely for bootstrapping in case + configure_requires is not supported. M::B::ModuleInfo remains as a + wrapper around Module::Metadata. + + - Module::Build::YAML has been deprecated. Module::Build now depends + directly upon YAML::Tiny. M::B::YAML remains as a subclass wrapper. + The YAML_support feature has been removed, as YAML is now an ordinary + dependency. + +0.36_19 - Tue Dec 7 13:43:42 EST 2010 + + Bug fixes: + + - Perl::OSType is declared as a 'configure_requires' dependency, but is + also bundled in inc (and loaded if needed) [David Golden] + +0.36_18 - Mon Dec 6 16:46:49 EST 2010 + + Changes: + + - Added dependency on Perl::OSType to refactor and centralize + management of OS type mapping [David Golden] + + - When parsing a version number out of a file, any trailing alphabetical + characters will be dropped to avoid fatal errors when comparing version + numbers. These would have been dropped (with a warning) anyway during + an ordinary numeric comparison. (RT#56071) [David Golden] + + Bug fixes: + + - A Perl interpreter mismatch between running Build.PL and running Build + is now a fatal error, not a warning (RT#55183) [David Golden] + + - Bundled Module::Build::Version updated to bring into sync with CPAN + version.pm 0.86 [David Golden] + + - No longer uses fake user 'foo' in t/tilde (RT#61793) [David Golden] + + - Won't fail tests if an ancient Tie::IxHash is installed + [Christopher J. Madsen] + + - Correctly report missing metafile field names [David Golden] + + - Suppress uninitialized value errors during Pod creation + on ActiveState Perl [David Golden] + + - Return to starting directory after install action; this is + an attempt to fix an install.t heisenbug (RT#63003) [David Golden] + + - A broken version.pm load won't cause Module::Build::Version to + die trying to install itself as a mock version (RT#59499) + [Eric Wilhelm and David Golden] + + - PERL_DL_NONLAZY is now always set when tests are run + (RT#56055) [Dmitry Karasik] + + - 'fakeinstall' will use .modulebuildrc actions for 'install' if + no specific 'fakeinstall' options are provided (RT#57279) + [David Golden] + + - Add install*script to search path for installdeps client + and search site, then vendor, then core paths + + - Skip noexec tmpdir check on Windows (RT#55667) [Jan Dubois] + + - Arguments with key value pairs may now have keys with "-" in them + (RT#53050) [David Golden] + + - Add quotemeta to t/tilde.t test to fix Cygwin fails + [Chris Williams and David Golden] + + - Build script now checks that M::B is at least the same version + of M::B as provided in 'configure_requires' in META + (RT#54954) [David Golden] + +0.36_17 - Wed Oct 27 18:08:36 EDT 2010 + + Enhancements: + + - Added 'distinstall' action to run 'Build install' inside the + generated distribution directory [Jeff Thalhammer] + +0.36_16 - Thu Aug 26 12:44:07 EDT 2010 + + Bug fixes: + + - Better error message in case package declaration is not found + when searching for version. [Alexandr Ciornii] + + - Skips 'release_status' tests on perl < 5.8.1 due to buggy + treatment of dotted-decimal version numbers [David Golden] + +0.36_15 - Wed Aug 25 10:41:28 EDT 2010 + + Bug fixes: + + - Added a mock Software::License to prevent t/properties/license.t + from failing. + +0.36_14 - Sun Aug 22 22:56:50 EDT 2010 + + Enhancements: + + - Adds 'release_status' and 'dist_suffix' properties in preparation + for adding CPAN Meta Spec 2 support. 'dist_suffix' will be set + to 'TRIAL' automatically when necessary. [David Golden] + + - Makes 'license' more liberal. You can now specify either a license + key from the approved list (c.f. Module::Build::API) or just a + Software::License subclass name (e.g. 'Perl_5'). This should + provide better support for custom or proprietary licenses. + [David Golden] + +0.36_13 - Wed Jul 28 22:40:25 EDT 2010 + + Bug-fixes: + + - Bundled Module::Build::Version updated to bring into sync with CPAN + version.pm 0.82 [David Golden] + +0.36_12 - Tue Jul 27 00:08:51 EDT 2010 + + Enhancements: + + - Module::Build::Compat will now convert dotted-decimal prereqs into + decimal rather than dying (and will warn about this). [Apocalypse] + + Bug fixes: + + - Caches case-sensitivity checks to boost performance, fixes + RT#55162 and RT#56513 [Reini Urban] + + - Won't try to use ActivePerl doc generation tools without confirming + that they are indeed installed. [David Golden] + + - Sets temporary $ENV{HOME} in testing to an absolute path, which fixes + some issues when tested as part of the Perl core [Nicholas Clark] + + - Module::Build::ModuleInfo now warns instead of dying when a module + has an invalid version. ->version now just returns undef + (RT#59593) [David Golden] + + Changes: + + - When authors do not specify Module::Build in configure_requires and + Module::Build is automatically added, a warning will be issued + showing the added prerequisite [David Golden] + + - Moved automatic configure_requires generation into get_metadata() + and added an 'auto' argument to toggle it (on for META and off + for MYMETA) [David Golden] + +0.36_11 - Thu May 27 09:41:23 EDT 2010 + + Bug fixes: + + - Handle META/MYMETA reading and writing within Module::Build to ensure + utf8 mode on filehandles. Now passes/gets only strings to YAML::Tiny + or Module::Build::YAML + +0.36_10 - Wed May 19 18:36:06 EDT 2010 + + Bug fixes: + + - Fix failing t/manifypods.t on Windows from 0.36_09 changes [Klaus + Eichner] + +0.36_09 - Tue May 11 09:19:12 EDT 2010 + + Bug fixes: + + - Improve HTML documentation generation on ActivePerl (RT#53478) + [Scott Renner and Klaus Eichner] + +0.36_08 - Mon Apr 26 08:00:15 EDT 2010 + + Enhancements: + + - Give a list of valid licenses when given one we don't recognize + (RT#55951) [Yanick Champoux] + + - Added 'Build manifest_skip' action to generate a default MANIFEST.SKIP + [David Golden] + + Changes: + + - When temporarily generating a MANIFEST.SKIP when none exists, it will + be removed on exit instead of hanging around until 'Build clean'. This + is less surprising/confusing and the 'Build manifest_skip' action + is now available instead to bootstrap the file [David Golden] + + Bug fixes: + + - Fixed runtime error on cygwin when searching for an executable command + during installdeps testing [David Golden] + +0.3607 - Thu Apr 1 11:27:16 EDT 2010 + + Bug fixes: + + - The 'dist' action now always ensures a clean dist directory before + creating the tarball [David Golden] + +0.36_06 - Thu Apr 1 01:23:58 EDT 2010 + + Other: + + - Migrated repository to git and updated META.yml to match + + - Removed bugtracker URL (let search.cpan.org use default) + + - Disabled SIGNATURE generation + +0.3605 - Wed Mar 31 12:05:11 EDT 2010 + + - No changes from 0.36_04 + +0.36_04 - Tue Mar 16 21:41:41 EDT 2010 + + Bug fixes: + + - Added missing newline to "Changing sharpbang" messages under verbose + output (RT#54474) [David Golden] + + - Added 'beos' to list of Unix-like os types (RT#53876) [Nigel Horne] + + - Sets $ENV{HOME} to a temporary directory during testing [David Golden] + + - For VMS: fixed prefix handling plus other test fixes [Craig Berry] + + - Support anonymous array of directories for c_source [Alberto Simões] + + - Small POD formatting fix [James Keenan] + +0.3603 - Mon Jan 18 22:28:59 EST 2010 + +(Oops, I released the last one before I realized this should have been +fixed along with it.) + + Bug fixes: + + - Module::Build::Compat would croak on distibutions that set requires + 'perl' to a dotted decimal like '5.6.2'. We now skip that key + since it doesn't go into PREREQ_PM and we numify it properly for + 'use 5.006002' in the generated Makefile.PL (RT#53409) + [David Golden, adapted from patch by G. Allen Morris III] + +0.3602 - Mon Jan 18 22:09:54 EST 2010 + + Bug fixes: + + - Fix failures in t/properties/needs_compiler.t when $ENV{CC} is set + (RT#53296) [David Golden, adapted from patch by Jens Rehsack] + +0.3601 - Mon Dec 21 14:39:33 EST 2009 + + Bug fixes: + + - When the currently running Module::Build is not the same as the one + that created the Build file, there is now a warning rather than a fatal + error. This helps installation of dependency chains where a dependency + might configure_requires a new Module::Build after Build.PL was already + run for an earlier distribution. [David Golden, on advice of Matt Trout] + + Other: + + - t/bundle_inc.t fails in odd ways. This test of an experimental feature + should not prevent users from installing Module::Build, so this test + now skips unless $ENV{MB_TEST_EXPERIMENTAL} is true + +0.36 - Sun Dec 20 15:02:38 EST 2009 + +No changes from 0.35_15 other than the version number. + +Summary of major changes since 0.35: + + Enhancements: + + - Added 'Build installdeps' action to install needed dependencies via + a user-configurable command line program. (Defaults to 'cpan'.) + + - Command line options may be set via the PERL_MB_OPT environment + variable (similar to PERL_MM_OPT in ExtUtils::MakeMaker) + + - Generates MYMETA.yml during Build.PL (new standard protocol for + communicating configuration results between toolchain components) + + - Reduced amount of console output under normal operation (use --verbose + to see all output) + + - Added experimental inc/ bundling; see Module::Build::Bundling for + details. + + New or changed properties: + + - Added 'share_dir' property to provide File::ShareDir support; + File::ShareDir automatically added to 'requires' if 'share_dir' is set + + - Added 'needs_compiler' property. Defaults to true if XS or c_source + exist. If true, ExtUtils::CBuilder is also added to build_requires. + + - 'C_support' is no longer an optional feature. Modern ExtUtils::CBuilder + and ExtUtils::ParseXS added to the 'requires' list. This ensures that + upgrading Module::Build will upgrade these critical modules. + + - Clarified that 'apache' in the license attribute indicates the Apache + License 2.0 and added 'apache_1_1' for the older version of the license + (RT#50614) + + Deprecations: + + - Module::Build::Compat 'passthrough' style has been deprecated. Using + 'passthrough' will issue warnings on Makefile.PL generation. See + Module::Build::Compat documentation for rationale. + + Internals: + + - Replaced use of YAML.pm with YAML::Tiny; Module::Build::YAML is now + based on YAML::Tiny as well + + - A new get_metadata() method has been added as a simpler wrapper around + the old, kludgy prepare_metadata() API. + + - Replaced guts of new_from_context(). Build.PL is now executed in a + separate process before resume() is called. (This is generally only of + interest to Module::Build or toolchain developers) (RT#49350) + + - Add support for 'package NAME VERSION' syntax added in Perl 5.11.1 + + Notable bug fixes: + + - The "test" action now dies when using the 'use_tap_harness' + option and tests fail, matching the behavior under Test::Harness. + (RT#49080) [initial patch from David Wheeler; revised by David Golden] + + - Updated PPM generation to PPM v4 (RT#49600) [Olivier Mengue] + + - When module_name is not supplied, no packlist was being written; fixed + by guessing module_name from dist_version_from or the directory name + (just like ExtUtils::Manifest does without NAME) [David Golden] + + - Failure to detect a compiler will now warn during Build.PL and be a + fatal error when trying to compile during Build. (RT#48918) [David + Golden] + + - Auto-detection of abstract and author fixed for mixed-case POD headers + (RT#51117) [David Wheeler] + + - resume() was not restoring additions to @INC added in Build.PL + (RT#50145) [David Golden] + + - When tarball paths are less than 100 characters, disables 'prefix' + mode of Archive::Tar for maximum compatibility (RT#50571) [David Golden] + + - Merging 'requires' and 'build_requires' in Module::Build::Compat could + lead to duplicate PREREQ_PM entries; now the highest version is used + for PREREQ_PM. (RT#50948) [David Golden] + + - Module::Build::Compat will now die with an error if advanced, + non-numeric prerequisites are given, as these are not supported by + ExtUtils::MakeMaker in PREREQ_PM [David Golden] + + +0.35_15 - Thu Dec 17 17:51:22 EST 2009 + + Bug fixes: + + - Make sure PPM tests are skipped if IO::File is too old [David Golden] + +0.35_14 - Thu Dec 17 16:02:14 EST 2009 + + Bug fixes: + + - If not set, the 'module_name' is detected from 'dist_version_from' + or from 'dist_name'. The directory is no longer used. [David Golden] + + - The 'share_dir' property no longer defaults to 'share' and must be + explicitly set instead; this fixes problems for CPAN distributions that + already have a 'share' directory for whatever reason [David Golden] + + - Change t/00-compile.t test for more portability [David Golden] + + - Skip ppm.t if Pod::Html is not available [David Goldenj] + + - Changed guts of inc::latest to work properly on older versions of Perl + [David Golden] + + - Ensure bundle_inc.t doesn't accidentally uninstall the installed M::B + during testing if the user had 'uninst=1' set during Build.PL + [David Golden] + +0.35_13 - Sat Dec 5 11:26:36 EST 2009 + + Bug fixes: + + - Protect against tempfile errors when checking ExtUtils::Installed + [David Golden] + +0.35_12 - Fri Dec 4 23:06:49 EST 2009 + + Bug fixes: + + - Protect inc/ bundling tests against broken ExtUtils::Installed + [David Golden] + +0.35_11 - Thu Dec 3 11:07:44 EST 2009 + + *** API CHANGE *** + + - The old API for prepare_metadata() has been restored to avoid breaking + distributions that were overriding it (e.g. BioPerl), but the method + has been marked deprecated and may be made private or may disappear in + some future version of Module::Build. [David Golden] + + - A new get_metadata() method has been added as a simpler wrapper around + the old, kludgy prepare_metadata() API. [David Golden] + +0.35_10 - Tue Nov 24 22:49:19 EST 2009 + + Bug fixes: + + - bundle_inc.t is more careful about permissions and open filehandles + to avoid failures/skips on Win32 [David Golden] + + - Fix compilation error in Module::Build::Platform::VMS (RT#51766) + [David Golden] + + - Don't generate a MANIFEST.SKIP during distclean and add any generated + MANIFEST.SKIP to cleanup list [reported by Zefram, fixed by David Golden] + + - Module::Build::ModuleInfo version parsing would fail if a module sets + its $VERSION from another module, but the other module is not installed. + We now try to detect such failures, prepend 'lib' to @INC and try again. + [David Golden] + + - MYMETA.yml used to be generated from scratch, overriding any + customizations used to create META.yml. Now, if META.yml exists, that + will be used as the base for MYMETA and only prereq fields will be + updated (to reflect any dynamic configuration); also, 'dynamic_config' + will be set to false and 'generated_by' will be updated [David Golden] + +0.35_09 - Thu Nov 19 01:30:42 EST 2009 + + Bug fixes: + + - The DB package should not be included in 'provides' in META files + [David Golden] + + - Fixed t/xs.t build failures in bleadperl for noexec temp directories + [Nicholas Clark] + + - Adjusted order of @INC in resume() (fixes par.t, ppm.t, xs.t fails): + @INC = @new_additions_to_inc, @saved_additions_to_inc, @default_inc + [David Golden] + + - Skip bundle_inc.t tests if bundled Module::Build for test can't be + tweaked (Works around test crashes on Win2) [David Golden] + + Other: + + - 'C_support' is no longer an optional feature. Modern ExtUtils::CBuilder + and ExtUtils::ParseXS added to the 'requires' list. This ensures that + upgrading Module::Build will upgrade this critical modules. + ExtUtils::CBuilder no longer requires a compiler, so it is "safe" to + require. + +0.35_08 - Mon Nov 16 22:38:28 EST 2009 + + Bug fixes: + + - Multiple tests were failing due to dependency problems. Author + dependencies have been largely removed from core 'requires' into + optional features. Feature prereq detection and messaging have been + expanded and bugs on older Perls have been removed. + +0.35_07 - Sat Nov 14 17:14:39 EST 2009 + + Bug fixes: + + - Auto-detection of abstract and author fixed for mixed-case POD headers + (RT#51117) [David Wheeler] + + - resume() was not restoring additions to @INC added in Build.PL + (RT#50145) [David Golden] + + - When tarball paths are less than 100 characters, disables 'prefix' + mode of Archive::Tar for maximum compatibility (RT#50571) [David Golden] + +0.35_06 - Fri Nov 13 14:51:28 EST 2009 + + Enhancements: + + - Added experimental inc/ bundling; see Module::Build::Bundling for + details. [David Golden and Eric Wilhelm] + + - Clarified that 'apache' in the license attribute indicates the Apache + License 2.0 and added 'apache_1_1' for the older version of the license + (RT#50614) [David Golden] + + Bug fixes: + + - Merging 'requires' and 'build_requires' in Module::Build::Compat could + lead to duplicate PREREQ_PM entries; now the highest version is used + for PREREQ_PM. (RT#50948) [David Golden] + + - Module::Build::Compat will now die with an error if advanced, + non-numeric prerequisites are given, as these are not supported by + ExtUtils::MakeMaker in PREREQ_PM [David Golden] + + - Made MYMETA generation non-fatal if fields required for META.yml + are missing [David Golden] + + - Added Pod::Simple to requirements for manpage support; avoids + problems if a user has a broken Pod::Man/Pod::Simple. (RT#50081) + [David Golden] + + - Won't die if installed Pod::Readme is broken [David Golden] + + Other: + + - Fixed Module::Build::Notes POD [David Golden] + + - Some commands had become silent by default, so added a few short status + messages so users know something actually happened [David Golden] + + - Cleaned up Changes file formatting [David Golden] + + - Removed most PERL_CORE customizations from test files due to + reorganization of dual-life modules in core (RT#49522) [David Golden] + +0.35_05 - Wed Oct 28 17:20:59 EDT 2009 + + Bug fixes: + + - Fix test failure in t/actions/installdeps.t when $^X is not the default + perl [David Golden] + + - Work around $VERSION numbers in ActiveState with multiple underscores + that prevent Module::Build from installing on Win32 [David Golden] + + - Fix bug cleaning compatibility Makefile when older ExtUtils::Manifest is + installed [David Golden with help from David Cantrell] + + Other: + + - Suppressed more warnings from tests [David Golden] + + - Add provisional support for 'package NAME VERSION' syntax added in + Perl 5.11.1 [David Golden] + +0.35_04 - Fri Oct 23 11:20:41 EDT 2009 + + Bug fixes: + + - Fix test failure if IPC::Cmd isn't installed [David Golden] + + Other: + + - Suppressed warning messages from various tests [David Golden] + +0.35_03 - Wed Oct 21 21:20:59 EDT 2009 + + *** API CHANGE *** + + - The prepare_metadata() method used to take a YAML::Node object as an + argument for modification. The method now takes no arguments and just + returns a hash reference of metadata. [David Golden] + + Enhancements + + - Command line options may be set via the PERL_MB_OPT environment + variable (similar to PERL_MM_OPT in ExtUtils::MakeMaker) + + Bug fixes: + + - Updated PPM generation to PPM v4 (RT#49600) [Olivier Mengue] + + - When c_source is specified, the directory scan will include additional, + less-common C++ extensions (RT49298) [David Golden] + + - When module_name is not supplied, no packlist was being written; fixed + by guessing module_name from dist_version_from or the directory name + (just like ExtUtils::Manifest does without NAME) [David Golden] + + - Bumped IO::File prereq to fix binmode failures in PPMMaker on Perl + prior to 5.8.8 [David Golden] + + Other: + + - Replaced use of YAML.pm with YAML::Tiny; Module::Build::YAML is now + based on YAML::Tiny as well [David Golden] + + - Reduced amount of console output under normal operation (use --verbose + to see all output) [David Golden] + +0.35_02 - Mon Sep 7 22:37:42 EDT 2009 + + Enhancements: + + - Added 'needs_compiler' property. Defaults to true if XS or c_source + exist. If true, ExtUtils::CBuilder is also added to build_requires. + [David Golden] + + - File::ShareDir automatically added to 'requires' if 'share_dir' is set + [David Golden] + + - Added 'Build installdeps' action to install needed dependencies via + a user-configurable command line program. (Defaults to 'cpan'.) + [Eric Wilhelm] + + Bug fixes: + + - Failure to detect a compiler will now warn during Build.PL and be a + fatal error when trying to compile during Build. (RT#48918) [David + Golden] + + - Fixed directory sorting failure in share_dir.t [David Golden] + + - Property defaults that are data structures were being assigned as + references to new objects. Changed so that defaults are cloned instead. + (This mostly affects testing, which often creates multiple objects in the + same process) [David Golden] + + - Simplified error message on exit under use_tap_harness [suggested by + David Wheeler] + + - Fixed typemap search to use a dist-level typemap if a typemap is not + found in the directory with the *.xs file; (was manifesting as warnings + in Perl 5.6 tests) [David Golden] + + Other: + + - Replaced guts of new_from_context(). Build.PL is now executed in a + separate process before resume() is called. (This is generally only of + interest to Module::Build or toolchain developers) (RT#49350) [David + Golden, Eric Wilhelm, Ken Williams] + + - Revised test helper classes to fix potential bugs and add new features + to make writing tests simpler and easier. Changes incorporated into + t/README.pod and t/sample.t as examples for new testing. [David Golden] + +0.35_01 - Mon Aug 31 12:11:10 EDT 2009 + + Enhancements: + + - Generates MYMETA.yml during Build.PL (new standard protocol for + communicating configuration results between toolchain components) + [David Golden] + + - Added 'share_dir' property to provide File::ShareDir support; + set automatically if a directory called 'share' exists + [David Golden] + + Bug fixes: + + - Fix the t/destinations.t fix. [David Golden, with thanks to Eric Wilhelm] + + - Fix recursive test files in generated Makefile.PL (RT#49254) [Sawyer X] + + - Guard against trying :utf8 when :utf8 isn't available + + - The "test" action now dies when using the 'use_tap_harness' + option and tests fail, matching the behavior under Test::Harness. + (RT#49080) [initial patch from David Wheeler; revised by David Golden] + + Other: + + - Added t/README.pod and t/sample.t to guide developers writing new tests + [David Golden, with some code from Eric Wilhelm] + + - Module::Build::Compat 'passthrough' style has been deprecated. Using + 'passthrough' will issue warnings on Makefile.PL generation. See + Module::Build::Compat documentation for rationale. + +0.35 - Thu Aug 27 09:12:02 EDT 2009 + + Bug fixes: + + - Fix t/destinations.t segfault on 5.6.2 [David Golden] + +0.34_06 - Sat Aug 22 21:58:26 EDT 2009 + + Bug fixes: + + - Multiple test fixes for OS2 [Ilya Zakharevich] + + - Generated.ppd files use :utf8 if possible (RT#48827) [Olivier Mengue] + + - Fixed preservation of custom install_paths on resume (RT#41166) + [David Golden] + + - Warn instead of crashing when Pod::Man tries to create files with + colons on vfat partitions on unix (RT#45544) [David Golden] + +0.34_05 - Sun Aug 9 22:31:37 EDT 2009 + + Bug fixes: + + - When auto_configure_requires is true (the default), Module::Build will + only add last 'major' version of Module:Build (e.g. 0.XX) to + configure_requires to avoid specifying a minor development release not + available on CPAN [David Golden] + +0.34_04 - Sat Aug 8 11:02:24 EDT 2009 + + Other: + + - Added documentation warning that 'get_options' should be capitalized + to avoid conflicting with future Module::Build options and changed + the examples accordingly. + +0.34_03 - Sat Aug 8 07:39:16 EDT 2009 + + Bug fixes: + + - Fixed failing xs.t if /tmp is mounted noexec (RT#47331) [David Golden] + + - Fixed failing debug.t on VMS (RT#48362) [Craig Berry] + + - Prevent par.t from dying on error in .zip extraction [David Golden] + + - Fixed potential runthrough.t failure on 5.6.2 [David Golden] + + Other: + + - Archive::Tar changed from 'requires' to 'recommends' so non-authors + without IO::Zlib can still use Module::Build to install modules + [reported by Matt Trout, fix by David Golden] + +0.340201 - Sun Aug 9 22:11:04 EDT 2009 + + Other: + + - Version bump for Perl core for 5.10.1 release; no other changes + +0.34_02 - Sun Jul 26 22:50:40 EDT 2009 + + Bug-fixes: + + - Bundled Module::Build::Version updated to bring into sync with CPAN + version.pm 0.77 [John Peacock] + +0.34_01 - Sat Jul 18 16:32:09 EDT 2009 + + Enhancements: + + - Added --debug flag to trace Build action execution (RT#47933) + [David Golden] + + Bug-fixes: + + - Bundled Module::Build::Version version code updated to fix unsafe use + of $@ (RT#47980) [John Peacock] + +0.34 - Tue Jul 7 16:56:47 EDT 2009 + + No changes from 0.33_06 + +0.33_06 - Sun Jul 5 10:11:40 EDT 2009 + + Bug-fixes: + + - Bundled version code will use pure Perl on 5.10.0 to work around + a corner case involving eval and locale [John Peacock] + + - Reversed VMS patch from 0.33_03 [Craig Berry] + + - PL_files in Build.PL that are in the bin/scripts directory should not be + installed as if they are scripts (fixed for case-tolerant systems). + [David Golden, reported by Craig Berry] + +0.33_05 - Sun Jun 28 22:06:49 EDT 2009 + + Enhancements: + + - New 'auto_configure_requires' parameter (default 1) controls + whether Module::Build should add itself to configure_requires + in META.yml if not specified in Build.PL [David Golden] + + Bug-fixes: + + - The default MANIFEST.SKIP created by the "manifest" action + was out of date. It will now use the installed MANIFEST.SKIP + and add some Module::Build and distribution specific items + to it. [Michael Schwern] + + Other: + + - configure_requires do not necessarily need to be in requires + or build_requires; warning to that effect has been removed + [David Golden] + +0.33_04 - Fri Jun 26 07:09:06 EDT 2009 + + Bug-fixes: + + - Don't try utf8 YAML I/O on Perl 5.6 [David Golden] + + Other: + + - configure_requires added to prereq report (RT#47254) [Curtis Jewell] + + - updated Module::Build::Version to match forthcoming version.pm 0.77 + (RT#47256) [John Peacock] + + - skips xs.t and ppm.t when perl was not compiled with dynamic loading + since Module::Buld does not support static linking (RT#46178) + [David Golden] + + - skip failing test in par.t if Archive::Zip is broken [David Golden] + + - Added YAML utf8 patch in 0.33_03 changes list + + - Added attribution for patches in 0.33_03 changes list + +0.33_03 - Mon Jun 22 17:22:56 EDT 2009 + + Bug-fixes: + + - Removes Module::Build from its own configure/build_requires + [David Golden] + + - ConfigData->feature() confirms that modules actually load successfully, + not just that they are present. (RT#43557) [David Golden] + + - Module::Build::Compat handling of INSTALL*LIB (RT#43827) + [Tony Payne, David Golden] + + - Module::Build::Compat and recursive test files (RT#39171) [Dave Rolsky] + + - Fixed bug linking non-standard XS names on Windows (RT#38065) ["snaury"] + + - Run PL files that don't generate any file (RT#39365) + [Matisse Enzer, David Golden] + + - HTML generation failure no longer fatal (RT#36660) [David Golden] + + - realclean might not delete Build.bat on Windows (RT#43863) + [Roy Ivy, David Golden] + + - include_dirs parameter now works correctly when given a single + string argument (RT#40177) [David Wheeler] + + - Lots of spelling fixes in the POD (RT#45528r) [Lars Dieckow] + + - On Unix-like systems, tilde expansion is more liberal in username + characters accepted (RT#33492) [Jon Jensen] + + Other + + - On MSWin32, bumped File::Spec prereq to 3.30 for a variety of fixes + + - Add support for VMS in Unix compatibility mode (RT#42157) + [John E. Malmberg + + - Added a can_action($name) method (RT#45172) [brian d foy] + + - Documented that subclass methods should not permanently change + current directory (RT#46919) [David Wheeler] + + - META.yml encoded in UTF-8 (RT#43765) [Olivier Mengue] + +0.33_02 - Mon Jun 15 12:23:55 EDT 2009 + + Bug-fixes: + + - Fixed tests for bleadperl + +0.33_01 - Sat Jun 13 20:24:42 EDT 2009 + + Bug-fixes: + + - Fixed RT#42724: consolidated VMS fixes [patch by Craig Berry] + + - Fixed RT#46338: passthrough Makefile.PL cleans Makefile during distclean + + - Fixed RT#45700: t/compat.t for HP/UX make + + Other: + + - Adds current Module::Build to configure_requires (and build_requires) + if no configure_requires is specified + + - Always normalizes version number tuples in META.yml (e.g. 'v1.2.0') + (Partially addresses RT#46150) + + - Normalizes a generated dist_version (e.g. from a .pm file) -- + dist_version set manually in Build.PL is not normalized + + - Documentation update for create_license + + - Minor POD cleanup + +0.33 - Sun May 3 20:16:34 PDT 2009 + + Bug-fixes: + + - Fixed RT#45462: Compat.pm needs to reference 'Build.com' on VMS + [patch from John Malmberg] + + - Fixed RT#45461: ext.t on VMS [patch from John Malmberg] + + - Fixed RT#43861: Module::Build::PPMMaker has broken PPD name + versioning for v5.10+ + +0.32_01 - Tue Apr 14 17:14:22 PDT 2009 + + Bug-fixes: + + - Module::Build::Compat had stopped adding "PL_FILES => {}" when no + PL_files property was set in Build.PL; restored old behavior and fixed + tests and documentation related to this issue [David Golden] + + - Caches ExtUtils::CBuilder object in a temporary stash instead of properties + + - Fixed undef resources->license in META.yml (RT #44453). + + - Use $^X instead of 'perl' in t/ext.t [David Golden] (RT #43485) + + Other: + + - Generated META.yml will indicate version 1.4 of the specification + (RT #37478) [patch from Alexandr Ciornii] + + - Archive::Tar now the default for generating tarballs on all platforms + (avoids problems with incompatible tar binaries) + + - dist_dir() now uses dist_name() and dist_version() accessors rather + than using its properties directly. [brian d foy] (RT #45038) + +0.32 - Wed Feb 25 17:40:02 PST 2009 + + No changes since 0.31_04. + +0.31_04 - Fri Feb 20 11:04:59 PST 2009 + + Other + +- Bumped Test::Harness prereq to 3.16 for latest PERL5LIB fixes (solves + test failures when installing Module::Build using CPANPLUS::Dist::Build) + [David Golden] + +0.31_03 - Sun Feb 8 14:54:01 PST 2009 + + Enhancements + + - added a "prereq_data" action that prints a Perl data structure of + all prerequisites; can be loaded by external tools using eval() + [David Golden] + + Bug-fixes + + - 'fakeinstall' action warns and skips without ExtUtils::Install 1.32+ + [David Golden, reported by Zefram] + + - allows Module::Build version mismatch when installing self; works around + limitations in CPANPLUS::Dist::Build [David Golden] + +0.31_02 - Tue Jan 27 09:16:43 PST 2009 + + Other + + - tests now use File::Temp (added to build_requires); appears to fix + Win32 testing heisenbug on directory removal during high system loads + + - use_tap_harness.t will skip unless a release version of TAP::Harness + is installed + + - improved diagnostics to ensure_blib() tests in t/lib/MBTest.pm + + Compat + + - passthrough Makefile.PL will now play nice with cpantesters' on + exit(0) (RT#32018) [Eric Wilhelm] + + Bug Fixes + + - fix for doubling-up of --prefix (RT#19951) + +0.31012 - Wed Jan 14 01:36:19 PST 2009 + + Bug Fixes + + - t/tilde.t maybe actually fixed on MSWin32 now. + +0.31011 - Mon Jan 12 21:57:04 PST 2009 + + Bug Fixes + + - t/tilde.t had been failing on MSWin32 (RT#42349) + +0.3101 - Mon Jan 12 13:52:36 PST 2009 + + Other + + - added 'mirbsd' as a Unix-type OS [BinGOs] + + - added 'haiku' as a Unix-type OS (backported from bleadperl) + + - skips certain tests on VMS (backported from bleadperl) + + - sets $^X to absolute path in tests (backported from bleadperl) + +0.31 - Sat Dec 20 15:03:33 2008 + + Deprecations + + - Use of attributes as class methods is deprecated (this was never a + documented feature and appears to only have worked accidentally.) + +0.30_02 - Mon Dec 15 12:23:55 PST 2008 + + Bug Fixes + + - make Software::License dependency "softer". + +0.30_01 - Thu Dec 11 18:25:53 PST 2008 + + New Docs + + - Added a recipe for writing a new action to the Cookbook + + - Added a recipe for bundling Module::Build to the Cookbook. + + Doc Fixes + + - Clarified dist_abstract search procedure in API.pod (RT#41056) [Mario + Domgoergen] + + Bug Fixes + + - Workaround HARNESS_TIMER env issue in t/compat.t (RT#39635) + + - Fix ~ expansion when $HOME is different from /etc/passwd as + when running sudo. [rt.cpan.org 39662] + + - Fixed a small POD error in the Cookbook. [Damyan Ivanov] + + - Unset group/other write permission bits when using Archive::Tar to + build the dist tarball. (RT#39804) [David Golden] + + Enhancements + + - We now support a 'create_license' parameter to new() that will + create a LICENSE file during the 'dist' phase with the full text of + the license. This requires Software::License on the author's + machine. + + - Added lgpl2/lgpl3 entries to the supported licenses (RT#40532). + + - Support for validating properties with a check subref. [David + Wheeler] + + Test Fixes + + - Defend against more stray environment variables interfering + with the tests. + + Other + + - Updated our embedded version.pm to 0.76, enhanced documentation on + dist_version_from. [John Peacock] + +0.30 - Thu Sep 25 20:57:36 2008 + + - First non-beta release since April 2007. In the meantime, Sarkozy + became president of France, the 35W bridge fell in Minneapolis, + Phelps won a lot of gold, a new tribe of indigenous people was + discovered in the Amazon, and Bob Barker stopped doing The Price Is + Right. As of this moment though, the U.S. economy still hasn't + collapsed completely. + +0.2808_05 - Thu Sep 18 23:30:39 PDT 2008 + + - Skip test in t/ext.t which tickles shellwords() in Text::ParseWords + below 3.23 [David Wheeler, Ken] + + - Fixed some shell-quoting issues in do_system() on Windows [Ken, + Schwern, reported by Curtis Jewell] + + - Fixed t/xs.t failure for missing 'const char *' typemap in 5.6 + [Schwern] + + - Added build_requires for Test::More 0.49 and Test::Harness 2.03. + Removed bundled Test::More (was not working for 5.005x anyway). + [Schwern] + + - Minimum required perl version is now 5.6.1. [Schwern] + +0.2808_04 - Thu Sep 11 22:51:27 PDT 2008 + + - Backed-out incompatible Module::Build::ModuleInfo change (first in + 0.2808_02.) + +0.2808_03 - Mon Sep 1 14:43:27 PDT 2008 + + - Made adjustments for the format changes of recent Test::Harness + output. [Nicholas Clark] + + - Fixed the documentation for script_files to indicate that we search + bin/ for scripts by default. It has been this way for several + years. [Spotted by Ron Savage] + +0.2808_02 - Wed Jul 9 16:45:08 PDT 2008 + + - Experimental support for TAP::Harness with --use-tap-harness option + and the tap_harness_args property. [David Wheeler & Eric Wilhelm] + + - Added test_file_exts property for main-run tests other than '*.t'. + [David Wheeler] + + - Fixed getcwd()/rmtree() failure case on 5.10+mac where something is + unhappy about all of the tests deleting their distgen directory + before leaving it. [Eric Wilhelm & David Wheeler] + + - Improved support for parsing qv() in modules' $VERSION + declarations, and made $VERSION-parsing errors more verbose. [Jos + Boumans] + + - Integrated an omnibus patch for various VMS fixes. [Craig Berry & + John E. Malmberg] + + - Some versions of Test::Harness (or something) seem to not be + stripping the ".t" suffix when outputting test reports, which was + causing one of our tests in t/compat.t to fail. Fixed. [Spotted by + a smoke tester] + + - Most Unix platforms seem to allow hyphens in usernames, so we honor + this in our de-tilde-fying methods now. [Spotted by s-murata] + + - If there are multiple assignments to the $VERSION variable in + someone's module and this generates warnings, tell the user what + line number the problem is at. + + - Added 'gnu' and 'gnukfreebsd' as Unix variants. [Niko Tyni] + + - Fixed a couple bugs in how we quote arguments to external processes + when they have to pass through the shell. Also much more + thoroughly tested our quoting now. + + - Edited the Module::Build::API docs prose about the 'license' field + in response to some comments on the module-authors mailing list. + + - Fixed a typo in some example code in the Cookbook. [Jeremy Leader] + + - Custom typemaps were being looked for in places that don't quite + exist; fixed. [Michael G Schwern] + + - QNX/Neutrino is now considered to be Unix. [rt.cpan.org 32214] + + - Added 'gpl2' and 'gpl3' to the list of valid licenses. [Allen + Engelhardt] + + - Fixed our Data::Dumper wrapper's sensitivity to users who might set + $Data::Dumper::Terse. [Spotted by Dominique Dumont] + + - Documented the fix_shebang_line() method. [Elliot Shank] + + - Applied the 'const' modifier to version() and xs_version() XS + functions we use during testing. [Robin Barker] + + - Fixed processing of INC=, POLLUTE=, INSTALLDIRS=, and LIB= for + passthrough/small Makefile.PLs. + + - perl Build.PL --sign=1 now signs. [Michael G Schwern] + + - Fixed processing of INSTALLDIRS=whatever for compatibility + Makefiles. [Spotted by John Peacock] + + - Zillions of special-cases have been added in Compat.pm for dealing + with the special Makefile system on VMS. [John E. Malmberg] + + - Fixed some stuff in how VMS command-args get quoted. [John E. Malmberg] + + - VMS now overrides localize_file_path() and localize_dir_path() so + we don't need to do special stuff in the general case. [John + E. Malmberg] + + - Added a few more VMS-specific entries to the default MANIFEST.SKIP + file that (sometimes) gets created during the 'manifest' + action. [John E. Malmberg] + + - Fixed a catdir() that should have been a catfile() when creating a + ppmdist. [John E. Malmberg] + + - Removed some assumptions about what makefiles are called (not + necessarily "Makefile") and how they take their arguments, to get + VMS tests working better. [John E. Malmberg] + + - Fixed our check for Archive::Tar in the t/runthrough.t test, which + fixes a common failure on Win32. [Spotted by Chris Williams] + + - Fixed a File::Spec mal-ism in t/destinations.t [Craig A. Berry] + + - Exposed the internal ExtUtils::CBuilder object as part of our API, + via the cbuilder() method. [Zefram] + + - Upgraded to version.pm 0.74 (fixes bug #30004.) + + - Overwrite core (post-5.9.4) Module::Build installs (bug #20528.) + + - Pass quiet() option to ExtUtils::CBuilder object. + +0.2808_01 - Wed Oct 24 11:51:25 2007 + + - All .pm files in the Module-Build distribution (except for + M::B::Version.pm, which is kind of tied to version.pm) now have the + same $VERSION number explicitly specified. + + - When checking prerequisites, the required version of perl is now + checked before we start finding the $VERSION declaration of the + distribution, which results in much more intuitive error messages + e.g. if the author is using 5.6-isms in their declaration but the + user doesn't have 5.6. [Slaven Rezic] + + - Added 'artistic_2' license, corrected 'lgpl' license url (bug #29783) + [David Thomas] + + - VMS find_perl_interpreter() is just $^X (bug #29810) [Craig A. Berry] + + - Some large VMS fixes, mostly having to do with the non-case- + preserving nature of most VMS filesystems, but also correcting for + illegal characters in VMS file specs. [John E. Malmberg and Craig + A. Berry] + + - Fixed the _detildefy() method on VMS. [John E. Malmberg and Craig + A. Berry] + + - We now use a much more reliable method when Data::Dumper-ing saved + state data. [Yves] + + - When a module had 0.000 as its version, a few places in the code + thought the module had no version at all. This is now + fixed. [Andrew "Zefram" Main] + + - When finding the default set of script_files, we now compute them + as relative paths, not absolute. [Spotted by Curtis "Ovid" Poe] + + - Got rid of a call to eliminate_macros, which isn't needed in + Module::Build since there is no external make utility involved. + Override expand_test_dir to make up for the fact that the + home-grown glob() returns absolute, not relative, paths. [Craig + A. Berry] + + - Fixed a catdir() that needed to be catfile() in the .packlist + creation code. [John E. Malmberg] + + - If a *.PL file ended abnormally during the build, processing should + have stopped, but it didn't. Fixed. [Matthew Cast and David + Golden] + + - Module::Build::Compat adds "require 5.XXXXX" to Makefile.PL when + 'perl' is specified as a 'requires' prerequisite [David Golden] + + - Refactored t/compat.t for modularity and transparency; added + labels for all tests; supressed subprocess output to + STDOUT and STDERR [David Golden] + + - Fixed bug in perl_version_to_float when version is already a float + [David Golden] + + - Removed a mention of $build->{config} from the documentation, the + official interface to Config.pm settings is now via the + $build->config() and has been for some time. [Suggested by Michael + Schwern] + + - Tweaked some text in the Cookbook to bring it into the modern age, + and added a recipe for accessing Config.pm settings. [Ibid] + + - Lots of POD link/readability improvements to the Module::Build::API + documentation [Salve J. Nilsen] + + - Added configure_requires as a new type of prereq. [Suggested by Adam + Kennedy] + + - Patch 31156 from bleadperl: some filename dot and extension help + for Module::Build on VMS. [Craig Berry] + + - Reworked the _detildefy() method so it doesn't depend on glob() + anymore. This gets rid of a problem with spaces or other special + shell characters in things like 'prefix' or 'install_path' + entries. [Prodding by Eric Wilhelm] + + - Added midnightbsd to the list of Unix-like OSes we know about + [Rafael Garcia-Suarez] + +0.2808 - Sat Apr 28 12:59:43 2007 + + - Added is_vmsish(), is_windowsish(), and is_unixish() boolean + convenience functions. Fixes some test failures on platforms where + $^O is set to a value we don't know about (like 'gnu'). + + - Upgraded to version.pm 0.7203. [John Peacock] + + - Support get_action_docs() =head2 style. [ewilhelm] + + - Workaround Test::Pod::Coverage @INC bug. [Eric Wilhelm] + + - Fixed the command-line args --extra_compiler_flags and + --extra_linker_flags so they properly shell-split their arguments. + +0.2807 - Sat Mar 24 22:19:02 2007 + + - Upgraded to version.pm 0.71. [John Peacock] + + - Removed a couple small constructs in the tests ("use warnings;" and + "qw$foo bar$[1]") that caused test failures under perl 5.005. + + - Added support for an explicit default value of undef in prompt(). + [Eric Wilhelm] + + - Improved our prompt() method, which could sometimes hang before the + user got a chance to see a prompt. [Andreas Koenig] + + - Added a note about --allow_mb_mismatch to the error message that + happens right before someone might want to use that parameter. + + - Added DragonflyBSD to the list of known Unix OSes. + + - get_action_docs() dies on error rather than twiddling $@ + + - Made ModuleInfo's _evaluate_version_line() compatible with 'use + version ...$VERSION' lines. [Eric Wilhelm] + + - Added some verbiage in Module::Build::API that officially blesses + the _build/prereqs file for external consumption. [Suggested by Andreas Koenig] + + - Added test profiles support via the test_types property and "testall" + target. [Eric Wilhelm, Jeff Lavallee] + + - Use syscopy() on OS/2 in copy_if_modified() so we make sure to + overwrite any existing target file. [Ilya Zakharevich] + + - Removed seemingly silly '~~' test in t/tilde.t. + + - In our test-time utility library t/lib/MBTest.pm, we need to know + about a few .exe-like extensions on OS/2. [Ilya Zakharevich] + + - In t/ppm.t, use DynaLoader::mod2fname() (if available) to determine + the correct translation of our test module's name into a DLL + name. [Ilya Zakharevich] + + - Avoid an unlink() error on OS/2 when fixing shebang lines. [Ilya + Zakharevich] + + - When we're protecting the world from the evils of long RedHat + $ENV{PERL5LIB} variables, don't assume $ENV{PERL5LIB} is already + defined. This gets rid of a huge number of warnings for some + people. [Dave Rolsky] + +0.2806 - Fri Dec 15 22:20:14 2006 + + - On some systems (haven't identified the actual problem yet) + $ENV{PERL5LIB} can grow to enormous enough sizes that we can't + launch any more subprocesses because the environment table is full. + This is the now-infamous "Couldn't run Build.PL: Argument list too + long" error. Now we detect such situations and trim the directory + list to only include directories that actually exist, listed only + once each. Not the ideal solution, but it should work. + + - Silence a warning in M::B::ModuleInfo that happens when the author + is using the "$VERSION = eval $VERSION" idiom. + + - When running the 'testcover' action, do "cover --delete" if any of + the test files have changed (we already did so if any of the code + under test has changed). [Suggested by Chris Dolan, RT #23584] + + - Fixed a broken link in the documentation about PREFIX. [Spotted by + David Steinbrunner] + + - Changes to do_system() & friends on VMS to get system calls working + much better there. [Craig Berry] + + - Added the "pardist" target which creates a PAR binary distribution + akin to a PPM distribution. [Steffen Mueller] + + - Added the Interix platform as a Unix variant. [Stephen Hartland] + + - Improved the error message we emit when a distribution contains XS + files but the user has no C compiler. [Suggested by Andreas Koenig] + +0.2805_01 Thu Sep 7 21:57:29 CDT 2006 + + - Because of a weird behavior of YAML::Node, any distribution that + used version.pm objects to define their versions was generating the + wrong syntax for the versions in their META.yml file. They will + now appear as strings like v3.42.1 or similar, including the + leading v. + + - Upgraded to version 0.67 of version.pm. [John Peacock] + + - Added a contrib/ directory with a bash completion function for M::B + actions and switches. [Julian Mehnle] + + - When we eval() the embedded version.pm code we will now die() if + the eval() was unsuccessful, rather than continuing blindly on and + dying mysteriously later. + + - Added a 'retest' action that lets users run the current regression + tests on a previously-installed version of a distribution. + + * Instead of storing an entire dump of the Config.pm hash in the + _build/ directory upon startup, we now just store any overrides the + user or author has specified. Note that if you were doing anything + you weren't supposed to be doing, like poking around in the + internals of $buld->{config}, your code might break, so I've put + the asterisk of incompatibility on this one just to cover my + tuchus. [Idea originally by Randy Sims] + + - Made copying files via copy_if_modified() a little less chatty. + +0.2805 Sat Jul 29 22:01:24 CDT 2006 + + - We now embed a copy of version.pm right in the + Module::Build::Version source code, with John Peacock's blessing, + in case the user has a rough time installing version.pm. This + helps alleviate troubles people were still having with working out + a seemingly circular dependency (even though version.pm now ships + with a standard Makefile.PL too). A version.pm >= 0.661 installed + on the system will take precedence over our bundled one. [John + Peacock] + + - Fix some test warnings (or failures?) related to version.pm + numification. [John Peacock] + + - The top-level 'version' entry in META.yml files we'd generated was + in the wrong format (it was being treated as a version.pm object + rather than a serialized copy) due to a weird YAML::Node issue. + Fixed. + + - Don't 'use base qw(version)' anymore in our M::B::Version wrapper, + just set @ISA directly, because some people have reported that the + 'use base' line is croaking. + + - Added an 'allow_mb_mismatch' parameter to suppress the startup + check that ensures the version of M::B currently running is the + same as the one initially used to run the Build.PL. Use with + caution. + + - Module::Build::ModuleInfo will no longer detect things that look + like $VERSION assignments after an __END__ or __DATA__ token. + + - Updated documentation to mention the new mailing list on perl.org + rather than the old one on sourceforge. + +0.2804 Sun Jul 16 16:41:25 CDT 2006 + + - Added 'use version;' in Module::Build::Version, because some + versions of base.pm won't automatically load version.pm when we do + 'use base qw/version/;'. [Spotted by Erik Tank] + +0.2803 Sat Jul 15 08:26:34 CDT 2006 + + - The META.yml file in the last release was all screwed up, so the + distribution wasn't indexed properly. Fixed in this release. + +0.2802 Fri Jul 14 22:40:34 CDT 2006 + + - Added reliance on version.pm, which means we should deal much + better with the wide range of version specifications one finds on + CPAN. This is made possible by recent releases of version.pm that + give the user a pure-perl option, so installing version.pm + shouldn't be too onerous for most users. [John Peacock] + + - We should be accepting the default when we're in unattended mode, + not acting dumb and ignoring both the default and the [empty] + answer from the user. Fixed. [Spotted by Nik Clayton] + +0.2801 Sun May 21 00:07:40 CDT 2006 + + - Module::Build::Compat's emulation of INC is incorrectly prepending + a -I to the value of INC. This is incorrect because there should + already be a -I on the value. I.E. it's "perl Makefile.PL INC=-Ifoo" + not "perl Makefile.PL INC=foo" so Compat should not prefix a -I. + [Michael Schwern] + + - Native batch scripts under Windows should not be converted by + pl2bat. [Spotted by Ron Savage] + + - Tweaked the way we determine whether a file is executable on Unix. + We use this determination to decide whether to make it executable + during installation. [Julian Mehnle] + + - Replaced a vestigial 'next' with 'return' now that the code is in a + subroutine (htmlify_pods()), not a loop. [Ron Savage] + + - Fixed a guaranteed failure in t/signature.t when TEST_SIGNATURE was + set. [Eric R. Meyers] + + - Fixed a test failure that occurred when testing or installing in + unattended mode - the code to test whether unattended mode and + attended mode are working properly was assuming that we started out + in attended mode. [Steve Peters] + + - Improved our stand-in YAML generator that we use to generate + META.yaml when authors don't have a copy of YAML.pm installed on + their machine. It was unable to handle things like embedded + newlines in the data, now it has a much more extensive escaping + mechanism. [Stephen Adkins] + + - Revised the docs for --prefix and PREFIX. [Michael Schwern] + +0.28 Thu Apr 27 22:25:00 CDT 2006 + + - When y_n() or prompt() are called without a default value and the + build seems to be unattended (e.g. in automatic CPAN testing), we + now die() with an error message rather than silently returning + undef for prompt(), or looping indefinitely for y_n(). + + - When searching for '.modulebuildrc', return the first HOME-like + directory that actually contains the file instead of the first + existing directory. Document the search locations and the order + searched. [Spotted by David Golden] + + - Split the API documentation out of Module::Build::Authoring into + its own document: Module::Build::API. + + - We should not emit a warning if a Module::Build subclass is + required in a Makefile.PL that is not bundled in the current + distribution; it may be installed on the user's system. [Spotted by + Tyler MacDonald] + + - copy_if_modified() now preserves the executable bit of the source + file. [Spotted by Julian Mehnle] + + - Fixed compatibility of our screen-scraping the Test::Harness output + so we can recognize the most recent Test::Harness version. [Steve + Hay] + + - Backing out a requirement added in 0.27_06 on the method y_n() + to always include a default. This behavior would cause existing + build scripts to start failing. We now fail with a missing default + only when $ENV{PERL_MM_USE_DEFAULT} is set because there is no + reasonable default. + + - Make install_types() method smarter with respect to custom install + types. + + - Add documentation for the install_base_relpaths() and + prefix_relpaths() methods. Improved their usage for a public API, + and added tests. + +0.27_10 Tue Mar 28 22:50:50 CST 2006 + + - Added the create_packlist property, default true, which controls + whether packlist files will be written during installation. This + was already part of Module::Build 0.2609, but for some reason we've + forgotten it in the 0.27_xx series. [Spotted by Steve Kirkup] + + - Document the versions of Module::Build where each feature, action, + constructor argument, and method was first publicly documented. + + - More fixes for find_perl_interpreter() to work with BSD flavored + UNIX: Ensure we always return absolute paths; throw an exception + upon failure to find correct interperter; document everything. + + - We now include our own YAML.pm work-alike that we can use when the + real YAML isn't installed. We might soon even start using it when + YAML is installed, because the YAML API and dependency chain have + been changing in unfavorable ways lately. [Stephen Adkins] + + - Fixed some shell-argument-quoting issues on VMS. In the process, + we have added some support for avoiding tripping over + shell-argument-quoting issues on other platforms too. [Initial + patch by Craig A. Berry] + +0.27_09 Sat Mar 11 22:48:54 EST 2006 + + - Fixed find_perl_interpreter() so we can find the perl executable + when running from uninstalled perl even when $^X contains a + relative path. [Yitzchak Scott-Thoennes] + + - Fixed warning message where we were printing the wrong field names. + [Chris Dolan] + + - Added a 'testpodcoverage' action that runs a POD coverage check for + all modules in the distribution. [Yanick Champoux] + + - Added a Cookbook example of subclassing to modify an action. [Dylan + Martin and David Golden] + + - When building HTML documentation, we were opening the POD file and + not checking whether the open succeeded, which of course caused + problems down the line if it failed. Now we do "or die(...)" like + everywhere else. [Spotted by Joerg Braun] + +0.27_08 Fri Mar 3 21:22:41 CST 2006 + + - Due to shell quoting issues and differences in syntax between + various flavors of Windows, the code for the 'pl2bat' utility + distributed with Perl has been incorporated into M::B::P::Windows. + [Thanks to Dr Bean and Ron Savage for help testing and isolating + the problem.] + + - Modify add_build_element() so that it only adds elements if they + don't already exist. [David Wheeler] + + - Fixed a bug in the 'pass-through' Makefile.PL in which we would die + if CPAN::Shell->install returned false, but apparently this return + value is unreliable. Now we only die if the module is actually + unavailable after installation. + + - Fixed testing problems on VMS related to non-case-preserving + filesystems. We now bundle Tie::CPHash in the distribution (just + for testing purposes, it doesn't get installed) to help with + this. [Craig Berry and Yitzchak Scott-Thoennes] + + - We incorrectly documented the 'dynamic_config' flag in the META.yml + file as having a default value of false, but according to the + META.yml spec (which, for heaven's sake, we wrote) its default + value is true. Fixed. [Spotted by Adam Kennedy] + + - The have_c_compiler() method was dying if the ExtUtils::CBuilder + module wasn't around, which is obviously an unhelpful thing to do. + Now it just returns false. [Spotted by John Peacock] + + - Fix detection of $VERSION expressions that are not + assignments. [Spotted by Chris Dolan] + + - Obfuscate one of our constructs that uses a $VERSION variable, + because it was getting picked up by ExtUtils::MakeMaker's + version-finder. [Spotted by Randal Schwartz] + + - The config_data script for querying and/or setting a module's + config data was forgetting to call write() after setting config + values (though setting feature values was working fine). + Fixed. [Brian Duggan] + + - On Windows, remove the pl2bat generated 'Build.bat' script without + the annoying "The batch file cannot be found." error. [Solution + provided by RazTK and foxidrive on newsgroup alt.msdos.batch] + + - Our version comparisons should now work correctly with modules that + use version.pm to delcare their versions (e.g. "our $VERSION = + version->new('1.0.0')"). [John Peacock and Ron Savage] + + - We now create a Build.bat script on versions of Windows where it + makes sense. [Yves] + + - Fixed the verbiage around choosing the correct make-alike on + different platforms to suggest using 'perl -V:make'. [Suggested by + anonymous user] + +0.27_07 Wed Feb 1 20:07:45 CST 2006 + + - The notes() method now returns the new value when called with two + arguments, just like when it's called with one argument. [Tyler + MacDonald] + + - The notes() method now distinguishes among the values undef, 0, and + the empty string, where previously it didn't. [Tyler MacDonald] + + - We now unshift(@INC) rather than push(@INC) for the directory where + a build subclass lives, so that we're sure to pick up the right + version and not some already-installed version. [perlmonkey] + + - The SIGNATURE file for version 0.27_06 (and I'm sure for lots of + versions before that too!) was messed up, since we were modifying + some files after signing. This has been band-aided for the time + being by signing twice. [Reported by Chris Dolan] + +0.27_06 Mon Jan 23 21:44:54 CST 2006 + + - Fixed an undefined-variable warning when building the META.yml file + and the author hasn't used the 'module_name' mechanism. [Chris Dolan] + + - We should now work with recent (> 0.49) versions of YAML.pm when + creating the META.yml file. [Yitzchak Scott-Thoennes] + + - The y_n() method now requires the default parameter, and the + prompt() and y_n() methods have been improved with respect to + how they behave/detect when there is no user to ask. We're now + more consistent with MakeMaker, including respecting the + PERL_MM_USE_DEFAULT environment variable. [Tyler MacDonald and + Yitzchak Scott-Thoennes] + + - When building a README file using Pod::Text, work around a bug in + Pod::Text 3.01, which expects Pod::Simple::parse_file to take input + and output filehandles when it actually only takes an input + filehandle. [Yitzchak Scott-Thoennes] + +0.27_05 Thu Jan 12 17:39:21 CST 2006 + + - In t/common.pl, we were attempting to let the user's installed + Test::More take precedence over ours, but getting thwarted by all + the test scripts' loading Test::More beforehand. Fixed. [Spotted + by Yitzchak Scott-Thoennes] + + - In various test scripts, we were outputting some strings that + weren't strictly conformant with Test::Harness's expected input, + though it didn't actually cause problems. Now we're more + conformant, though not yet strict. [Spotted by Yitzchak + Scott-Thoennes] + +0.27_04 Fri Dec 23 10:43:34 CST 2005 + + - Removed experimental feature that extended the prerequisite system + to apply ('requires', 'recommends', and 'conflicts') prereqs to all + actions. Most of the internal extensiblity has been retained so + that prereq types can easily be added, more selectively. + + - Added a 'prereq_report' action that shows the user a well-formatted + list of all prerequisites, the versions required, and the versions + actually installed. [David Wheeler] + + - Clarified the directory name that's created during the 'distdir' + action. [Suggested by Tyler MacDonald] + + - Fixed a bug when creating the META.yml file without the help of + YAML.pm - some common strings weren't quoted & escaped properly. + Now only some uncommon ones are. [Spotted by Joshua ben Jore] + + - Fixed a bug in which an "UNINST=1" argument specified to a + passthrough Makefile's "make install" wasn't actually seen by + Module::Build. + + - Rather than dying when the Build script is run from the wrong + directory, it now simply chdir()s into the right directory and + keeps going. [Suggested by Dominique Quatravaux] + + - Added an "Examples on CPAN" section to the cookbook, with an + initial entry pointing to John Peacock's SVN-Notify-Mirror + distribution. + + - Add an invoked_action() method to return the name of the original + action invoked by the user. + + - Add 'meta-spec' field to the generated META.yml file, including the + version of the specification followed by the current Module::Build + and the url where the specification can be found. + + - Introduced two actions, 'html' & 'manpages', that generate + documentation for POD when the respective feature is enabled. The + actions will generate the documents even if there is no set place + to install to. However, if the actions are invoked as a dependency + of another action (e.g. build), the documentation will only be + built when there is a default or user-specified place to install to. + + - Added support for environment variable, 'MODULEBUILDRC', which can + be used to specify the full path to an option file to use instead + of the default location of ~/.modulebuildrc. A special undocumented + setting of 'NONE' tells Module::Build not to load any user settings, + so tests can be run without tainting from user options. + + - Documented and improved preliminary support for more Getopt::Long + style options are supported, including boolean options (--verbose, + --no-verbose), and use of hyphens in option names in addition to + underscores. + + - The option to disable/enable reading of the ~/.modulebuildrc file + is changed from 'skip_rcfile' to 'use_rcfile' + + - Allow the 'distmeta' action to continue when 'MANIFEST' is missing, + omitting the generation of the 'provieds' field. [Steven Schubiger] + + - Fixed some failing regex from generated MANIFEST.SKIP file. + + - Fixed an edge case in $VERSION parsing where we thought a package() + declaration was happening but it wasn't. [David Golden] + + - Added docs for the install_destination() and install_types() methods. + +0.27_03 (Beta for 0.28) Mon Oct 10 11:19:23 EDT 2005 + + - We now use ExtUtils::CBuilder to do all compiling of C code (for + example, when compiling XS modules). (This change actually + occurred in 0.27_01, but it was mistakenly omitted from the Changes + file.) + + - Fixed an issue on Win32 (and other case-tolerant + non-case-preserving systems, possibly like VMS?) in which the + current working directory would sometimes be reported with + different case, fooling us into thinking that we were in the wrong + directory. [David Golden] + + - The extra_compiler_flags setting was not actually being passed + along to ExtUtils::CBuilder so it could pass it along to the + compiler. Now it is. + + - The synonyms 'scripts' and 'prereq' for 'script_files' and + 'requires' were broken in a previous version (0.27_01, probably), + but now they're fixed. [David Golden] + + - Previously, we assumed that any custom subclass of Module::Build + was located in _build/lib/. This is only true if the author used + the subclass() method, though. We now use %INC to find where the + custom subclass really is, so that we can "use lib" it. We also + issue a warning if it seems to be outside the build directory. + [Spotted by Peter Tandler] + + - Added a URL for each license type that we know about, which will + appear as resources=>license: in the generated META.yml file. + + - If the user passes a no_index parameter to our constructor, we now + pass that through when building the META.yml file. [Richard + Soderberg, RT #9603] + + - A few more status messages can now be suppressed by using 'quiet' + mode. [Dave Rolsky] + + - Added some more entries to the default MANIFEST.SKIP file. [Chris + Dolan] + + - Our POD parser will now accept "AUTHORS" as well as "AUTHOR" when + looking for the author list in a module. [David Wheeler] + + - When looking for the POD to auto-generate a README file, or for the + AUTHOR or ABSTRACT for the distribution, we now also look for a + *.pod with the same name as the *.pm file specified by + 'version_from'. [David Golden] + + - The recommended dependency on ExtUtils::ParseXS has been moved into + the "C_support" auto_feature. + + - When building XS files, we now pass the -DVERSION and -DXS_VERSION + flags to the compiler. [Spotted by Jerry Hedden] + + - If a distribution has XS files and Module::Build has not been + configured with the "C_support" feature, we now issue a + warning. [Suggested by Jerry Hedden] + + - Added a dir_contains() method. + + - Some versions of MakeMaker, CPANPLUS, and/or PAUSE thought that a + certain line of our code was declaring a $VERSION when we didn't + intend to. The line has been obscurified so they won't think that + anymore. [Jos Boumans, RT #14226] + + - Added the Apache, MIT, and Mozilla licenses to the list of licenses + that this module knows about. [Bob Ippolito] + + - Fixed a pretty significant typo in the documentation for + auto_features. [Spotted by Jonas B. Nielsen] + + - In order to aid people who want to do customization of the META.yml + file, we've added a "metafile" property that can then be easily + overridden in subclasses, changed do_create_meta_yml() to + do_create_metafile(), and split out the code that actually + generates the YAML into a new method, write_metafile(). [David + Wheeler] + + - Fixed a couple of non-helpful behaviors with extra_compiler_flags + and extra_linker_flags. These will automatically be run through + split_like_shell() when given to new() as strings. + + - When the user doesn't have ExtUtils::ParseXS installed and we use + the old 'xsubpp', the displayed command line for creating the .c + file from the .xs file was missing its newline. Now it's got it. + +0.27_02 (Beta for 0.28) Fri Jul 15 07:34:58 CDT 2005 + + - Provided initial support for the --prefix installation parameter, + which acts like MakeMaker's PREFIX. It is still highly recommended + NOT to use it when you could reasonably use --install_base or + --install_path or --install_dest, but that's just because the way + --prefix is designed is weird and unpredictable. Ultimately the + choice rests with the installing user. [Patches by Michael Schwern + and Rob Kinyon] + + - Fixed a bug in subclass() which prevented people from using it to + subclass subclasses of Module::Build. [Chris Dolan] + + - Added a 'pure_install' action, which for the time being is + identical to the 'install' action. [Jos Boumans] + + - Fixed a POD error in an L tag. [Offer Kaye] + + - Note several options for automatically creating a new module dev + tree. [Suggested by Eric Wilhelm] + + - Removed some hard-coded references to File::Spec::Unix in the + creation of HTML docs, which should help that code work in more + places, and help people not to panic when they look at it. [Spotted + by Yves] + + - We now use Pod::Readme by default (instead of Pod::Text) to + generate the README file when the 'create_readme' option is used. + If Pod::Readme is not installed, we will still fall back to using + Pod::Text. [Robert Rothenberg] + + - The values of the "prefix", "install_base", "install_path", and + "install_dest" parameters can now begin with "~" or "~user", and + we'll de-tilde-ify them by using glob(). + + - The (optional) auto-creation of the README and Makefile.PL files + have been moved from the 'distdir' action to the 'distmeta' + action. [David Golden] + + - When looking for a .modulebuildrc file, we now use a fancier method + of trying to find the home directory, because $ENV{HOME} isn't a + very cross-platform variable. [Robert Rothenberg] + + - We now memoize the output of the internal _default_INC() method, + since it uses backticks and might be kind of slow. + + - When processing XS files, we now look for a typemap in lib/ as well + as using the system's default typemap. [John Peacock] + + - The DESTDIR, PREFIX, and INSTALL_BASE arguments to "make install" + are now supported for pass-through Makefiles (they've been + supported for quite a while as arguments to "perl + Makefile.PL"). [Requested by Guillaume Rousse] + + - Test::Harness has changed its output format in recent versions, + which threw off one of our tests. We now allow for this different + format. [Reported by Scott Godin] + + - Fixed an issue that prevented Module::Build from upgrading itself + using its own API (which is how CPANPLUS uses it). There are still + some issues with this solution, however. See ticket #13169 in + rt.cpan.org. [Reported by Jos Boumans] + + - Fixed a fatal error that occurred when a distribution's author + could not be determined from its POD nor from the call to + Module::Build->new() in its Build.PL. See ticket #12318 in + rt.cpan.org. [Reported by Jos Boumans] + + - Apparently on Windows and cygwin it's not possible to use the "-pi" + switch to perl without a backup extension, so now we use ".bak" and + remove the backup file when we're done. Thus the "dist" action for + Module::Build itself can now be run on those platforms. [Yitzchak + Scott-Thoennes] + + - Improved the handling of auto_features in the config_data access + script. [Yitzchak Scott-Thoennes] + +0.27_01 (Beta for 0.28) Fri Apr 15 21:12:57 CDT 2005 + + Backward-incompatible (but better) changes: + + * When using the 'install_base' option to choose a directory for + installing everything, perl modules now go into lib/perl5/ instead + of just lib/. It seems this is more consistent with people's + expectations, and the way I had it before was a bit peculiar to the + way I like things in my own home directory. [Michael Schwern] + + * When the user is using the 'install_base' option, scripts will now + be installed by default in $install_base/bin/ rather than + $install_base/script/ . [Jan Hudec and Michael Schwern] + + Major changes: + + - The auto_features mechanism will now re-evaluate dependencies every + time feature() is called for an auto-feature, rather than freezing + the success/failure value during 'perl Build.PL' and using that + value for all eternity (or module update, whichever comes first). + This applies to both $build->feature() and + FooModule::ConfigData->feature() calls. [Requested by many] + + - Added the meta_add and meta_merge mechanisms, which let the module + author add/merge arbitrary entries into the META.yml file. + + - Now reads per-action default options from '$ENV{HOME}/.modulebuildrc' + if it exists. Command line options override anything set in the rc file. + + - We now use ExtUtils::CBuilder to do all compiling of C code (for + example, when compiling XS modules). + + - The creation of Unix man pages is no longer a strict necessity - it + has now been turned into an 'auto-feature' contingent on the + presence of Pod::Man and a location specified for man pages to go. + + - A user-specified 'install_path' setting will now take precedence + over an 'install_base' setting. This allows the user to use + 'install_base' to set the base for all elements in one go, and then + use 'install_path' to override specific paths or add paths for + additional kinds of targets. + + - Split the main documentation from 'Module/Build.pm' into two + sections. The user level documentation and overview remains in + 'Module/Build.pm', while a new document, + 'Module/Build/Authoring.pod', has been created for module authors. + + Minor changes: + + - new_from_context() was losing its arguments in some cases (and not + because of inadequate training in forensic debate) - we now pass its + arguments directly to the Build.PL script rather than merging them + in afterwards. + + - Let resume() return an object blessed into the appropriate class + if the user has provided a subclass, as specified by the + 'build_class' property. This allows current() and new_from_context() + to behave more like factory methods returning objects of the correct + class based on context. [Ray Zimmerman] + + - Refactored methods relating to parsing perl module files for + package, version, and pod data into a new class: + Module::Build::ModuleInfo. It should not be considered part of + Module::Build's API, because we may split it out entirely as a + separate CPAN module that we depend on. + + - Added new method Module::Build::prepare_metadata() for authors to + override in order to add custom fields to META.yml. + + - We now use Test::More for our regression tests. If the user + doesn't have it installed, we include a copy in t/lib/ that we can + use during testing. + + - When copying files in the 'distdir' action, set permissions to match + the original files. [Julian Mehnle] + + - When adding files like META.yml to the MANIFEST, we now tell the + user we're doing so by printing one of the "Added to MANIFEST: ..." + lines. [Ron Savage] + + - Added a runtime_params() method, which lets a module author see + which parameters were overridden by the user on the command line + (or in whatever paradigm the user originally invoked Module::Build + from). [David Wheeler] + + - Added the current_action() method, which, surprisingly, returns the + name of the currently running action. [David Wheeler] + + - Added docs for run_perl_script(). + + - Added some stuff to the docs about why PREFIX is unsupported, and + what to use instead. [Steve Purkis] + + - The simple get/set accessor methods for all the 'parameters' like + verbose(), license(), etc. now have auto-generated documentation in + Module/Build.pm. + + - Created a Cookbook entry for 'Adding new elements to the install + process' + + - We now add META.yml to the MANIFEST when META.yml is created, not + when MANIFEST is created. [Spotted by Ron Savage] + + - Added some additional patterns to the suggested MANIFEST.SKIP + contents, and changed the docs so that we encourage the user to use + the MANIFEST.SKIP. [Ron Savage] + + - Eliminated a redundant recipe from the Cookbook, now that there are + some more extensive recipes on how to add stuff to the + build/install sequences. + + - Eliminated an undefined-variable warning when testing under perl 5.005 + + - When building HTML documentation, 'html_backlink' and 'html_css' + properties are now first-class properties, so they can be set from + the command line. [Suggested by Sagar R. Shah] + + - Have script_files default to everything in bin. I believe this is + the least surprising behavior. [Suggested by Michael Schwern] + + - If script_files is given a directory, consider each file in that + directory tree as a script to be installed. This avoids having to + remember to add to the script_files list every time you add a + program. [Suggested by Michael Schwern] + + - We now only load Pod::Man when we actually need to build man pages. + + - We now make Test::Harness use our carefully-selected path to a perl + executable regardless of Test::Harness's version. Previously we + let it figure stuff out for itself if it was a reasonably modern + version, but it's safer to make sure we're using the same perl + everywhere. + +0.2610 Fri Apr 15 08:25:01 CDT 2005 + + - new_from_context() was losing its arguments in some cases (and not + because of inadequate training in debate) - we now pass its + arguments directly to the Build.PL script rather than merging them + in afterwards. [Ray Zimmerman] + + - Fixed a bug in which config_data and feature data were being + forgotten and no ConfigData.pm module would get written. [Ray + Zimmerman] + + - Added a recipe to the cookbook showing how to run a single test + file from the command line. [William McKee] + + - For command-line arguments, we now accept the syntax "--foo=bar" in + addition to "--foo bar" and "foo=bar". This seems to fit well with + what GNU getopt and Getopt::Long do, and with people's + expectations. [Adam Spiers] + +0.2609 Wed Mar 16 22:18:35 CST 2005 + + - The html docs that were created during the first invokation of + './Build' were being found and treated as pod that needed to be + converted to html during subsequent invokations. We now are more + specific about the directories we scan for pod that needs to be + converted, effectively avoiding blib/html. [Ray Zimmerman] + + - If Pod::Man is not available, we now skip building man pages + (rather than dying) and tell the user why. + + - We now write a .packlist file upon installation, in the same place + that ExtUtils::MakeMaker does. [Johnny Lam] + + - On some Unix platforms (BSD derivatives, mostly) perl's $^X + variable isn't set to the full path of the perl executable, just + 'perl', when the 'Build' script is run as './Build' and not 'perl + ./Build'. This can lead to some other modules (maybe + Test::Harness, maybe IO::File, I dunno...) getting very confused + about where they are, and they try to load stuff from the wrong + perl lib, and big trouble ensues. To fix this, we now set $^X to + the value of Module::Build->find_perl_interpreter(). + + - The 'distcheck' action will now die() if it finds an error in the + MANIFEST, rather than just printing on STDOUT. [David Golden] + + - When the README and/or Makefile.PL are autogenerated using + create_readme or create_makefile_pl, we now automatically make sure + they're also listed in the MANIFEST file. [Suggested by Michael + Schwern] + + - Got rid of the t/MANIFEST file - it's superfluous, and it had + zero-length, which some versions of Tar don't like. [William + Underwood] + + - Added a mention in the documentation that each property that new() + accepts also has a corresponding get/set accessor. (In the version + 0.27_0x series each accessor method is mentioned explicitly in the + docs.) [Omission spotted by Ian Langworth] + +0.2608 Wed Jan 26 19:46:09 CST 2005 + + - Add workaround for test files because Devel::Cover causes + require to fail when the argument to require is an expression + involving File::Spec. We now assign the result of the File::Spec + call to a variable and then call require with that variable. + + - Tilde-expansion is now performed on arguments passed to a + compatibility-Makefile.PL [Spotted by Sam Vilain] + + - We now run the 'gzip' and 'tar' values through split_like_shell() + when running the 'dist' action, so that e.g. the 'gzip' value can + be set to something like "gzip -f --best" and it'll work + correctly. [Spotted by Chris Dolan] + + - Work around some bad mojo between Fedora Core [with its very long + @INC] and old versions of Test::Harness [with its propensity to + compound the number of @INC entries] that produced an "argument + list too long" error during testing. [assisted by Ville Skytta, + David Golden, & Randy Sims] + + - Killed an infinite loop that would happen in y_n() in interactive + mode if the author provided no default value. [Max Maischein] + +0.2607 (Bug fix release in 0.26 series) Sat Dec 18 14:14:09 CST 2004 + + - Instead of freezing @INC in the 'Build' script to the value it had + when Build.PL was run, we now just add those additional values that + aren't part of the default compiled-in @INC. [Michael Schwern] + + - The run_perl_script() method will now propagate any extra entries + in @INC (such as those added by "use lib" or the -I command-line + switch) to the subprocess. This helps situations in which you want + to tell the subprocess where to find a certain module, for + instance. [Michael Schwern] + +0.2606 (Bug fix release in 0.26 series) Tue Dec 7 22:33:11 CST 2004 + + - Fixed a linking bug on Win32, in which compiled C code object files + never got linked in with the modules being built. [Dominic + Mitchell] + + - Fixed a bug in the new_from_context() method in which any arguments + passed made us die. [Spotted by Jos Boumans] + +0.2605 (Bug fix release in 0.26 series) Tue Nov 30 07:16:13 CST 2004 + + - Fixed a bug in which zero-length arguments for hash-valued + parameters (e.g. " --config foo= ") weren't being allowed. + + - The tests now play better with environments in which version.pm is + pre-loaded, like in bleadperl. [John Peacock & Michael Schwern] + + - Fixed a syntax error in one of the tests under perl 5.005. + +0.2604 (Bug fix release in 0.26 series) Wed Nov 17 14:32:42 CST 2004 + + - Fixed a split_like_shell() bug introduced in 0.2603 for Windows, in + which an array reference passed as an argument was returned as an + array reference, rather than as a list. [Spotted by Steve Hay] + + - module_name() will now return '' instead of undef when module_name + is not set. This eliminates a couple uninitialized-value + warnings. [Suggested by Michael Schwern] + + - The expand_test_dir() method will now skip dotfiles (like ._foo.t, + which sometimes gets automatically created on Mac systems) when + 'recursive_test_files' is in effect. [Tom Insam] + +0.2603 (Bug fix release in 0.26 series) Mon Nov 15 10:28:00 CST 2004 + + - Added documentation for the new_from_context() method. + + - Completely rewrote the split_like_shell() method for the Windows + platform so it works like the command.com shell. [Randy Sims] + +0.2602 (Bug fix release in 0.26 series) Thu Nov 4 11:19:29 CST 2004 + + - The two bug fixes in 0.2601 gnashed against each other incorrectly, + resulting in a Win32 bug in split_like_shell(). Fixed. [Spotted + by Steve Hay & Randy Sims] + + - Removed a couple of 'use warnings' statements from the code - they + were causing compile failures on 5.005_04, where warnings.pm isn't + available. [Blair Zajac] + +0.2601 (Bug fix release in 0.26 series) Wed Nov 3 20:09:27 CST 2004 + + - Fixed some backslash problems with split_like_shell() on + Win32. [Steve Hay] + + - Fixed a bug in split_like_shell() in which leading whitespace was + creating an empty word, manifesting as something like "gcc - no + such file or directory" during tests. [Spotted by Warren L. Dodge] + +0.26 Sat Oct 9 17:51:01 CDT 2004 + + - Removed some language from the Module::Build::Compat documentation + that encouraged people to include a Build.PL without a Makefile.PL. + Also changed "a replacement for MakeMaker" to "an alternative to + MakeMaker" in the main documentation, which is basically what I + meant all along (i.e. a replacement for MakeMaker in your + particular build process - MakeMaker is never going to be fully + replaced in the perl world at large, of course), but some people + got the impression I was a little more truculent toward MakeMaker + than I really am. + + - Added the formal concepts of "features" and "config data" for + distributions. This allows the module author to define a certain + set of features that the user can switch on and off (usually + according to whether they have the proper prerequisites for them), + and to save build-time configuration information in a standardized + format. See the main documentation of Module::Build for more + details. (Note that the name of this system was called + "BuildConfig" for a while in beta, but now it's called + "ConfigData".) + + - Added an 'auto_features' capability, which simplifies the process + of defining features that depend on a set of prerequisites. + + - Added the 'get_options' parameter, which lets module authors + declare certain command-line arguments their Build.PL can accept + [David Wheeler] + + - Changed the split_like_shell() method to use the shellwords() + function from Text::ParseWords (a core module since 5.0), which + does a much better job than the split() we were using. + + - Added a 'testpod' action, which checks the syntactic validity of + all POD files in the distribution using Test::Pod. This eliminates + the need for doing so in a regression test. [Initial patch by Mark + Stosberg] + + - Added a process_files_by_extension() method, which generalizes the + kind of processing (essentially just copying) that happens for .pm + and .pod files, and makes it available to other user-defined types + of files. See the new cookbook entry. + + - Improved compatibility with version.pm when authors are using + version objects as their $VERSION variables. Now + version_from_file() can deal with these objects. Currently we + stringify them right away, but perhaps in the future we will + preserve them as objects for a while. + + - During 'distdir' and 'distmeta' actions, die a bit more gracefully + if there's no MANIFEST (i.e. explicitly say that a MANIFEST is + required). [Spotted by Adrian Howard] + + - Eliminated a recursive dependency between creating the MANIFEST + file and creating the META.yml file. [Spotted by Dave Rolsky] + + - On Win32, where a single directory might be known variously as + "Module-Build-0.25_03" or "MODULE~1.25_", we now use + Win32::GetShortPathName($cwd) to verify that the 'Build' script is + being run from the correct directory, rather than just a string + comparison. + + - The add_to_cleanup() method will now accept glob()-style patterns + in addition to explicit filenames. Also documented the fact that + they can be specified in either Unix-style or native-style + notation. + + - Passing a PREFIX value to a pass-through Makefile 'make install' + now has the same effect as passing it to 'perl Makefile.PL' (it + dies with a helpful message). + + - Added the 'testcover' action, which runs a test suite using + Devel::Cover. [Dave Rolsky] + + - Added the 'lib' and 'arch' installation directories to the search + path for the 'diff' action, since they won't necessarily (though + they usually will) be in @INC at installation time. [Suggested by + Kevin Baker] + + - The "=head3" POD directive isn't supported in older podlators + (particularly Pod::Man), so we don't use it anymore. + + - Fixed a typo & improved the docs in the SUBCLASSING section. [Ron + Savage] + + - Added the '.tmp' suffix to the default MANIFEST.SKIP file, which + should avoid adding things like pod2htmi.tmp to the MANIFEST [Ron + Savage] + + - Backup files from Emacs, containing the string '.#' in their names, + should no longer find their way into the blib/ directory (and from + there into installation directories). + + - Worked around an unpleasant interaction between version.pm and the + version-checking code that makes sure Module::Build's version + hasn't changed during the lifetime of the 'Build' script. [Reported + by Trevor Schellhorn] + + - Fixed a problem in htmlify_pods() that would produce test failures + on Cygwin (and probably elsewhere). [Yitzchak Scott-Thoennes] + + - Fixed a test failure on Cygwin (and probably elsewhere) in + t/compat.t, resulting from empty environment variables being set to + the empty string (as opposed to simply being unset) by their mere + presence in the "EXPORT:" list. + + - Fixed a fatal error that occurred when the author specified + 'dist_author' manually in their Build.PL script. [Spotted by Ron + Savage] + + - The 'provides' section of the META.yml file wasn't being built + properly on Win32, because of a mismatch between URL-format and + native-format pathnames. Fixed. [Reported by Robert Rothenberg] + + - The progress message "lib/Foo.xs -> lib/Foo.c" was previously being + output even when the Foo.c file wasn't being rebuilt. It's now + fixed. + + - Fixed a couple of places in Compat.pm where it could have forgotten + which perl interpreter it had been run with ($^X isn't very + trustworthy). + + - On some systems, the way we updated the timestamp on the + "lib/Foo.bs" file (one of the output files for XS-based modules) + was failing. It's been replaced by a simple call to utime(). + + - Fixed a problem in t/compat.t that prevented it from being run + individually using 'make test TEST_FILES=t/compat.t'. The problem + was that a couple environment variables (TEST_FILES, MAKEFLAGS) + were being passed through to subprocesses, and confused them. + + - Fixed an important typo in the documentation for the 'install_base' + parameter ('libdoc' and 'bindoc' were switched). [Ray Zimmerman] + + - The pass-through Makefiles (type 'small' or 'passthrough') now + support the TEST_FILES parameter to 'make test'. + + - Fixed a fatal error that would occur on perl 5.005 when building + HTML documentation, because its version of Pod::Html was old and + didn't like some of the parameters we fed it. [Spotted by Blair + Zajac] + + - The final line of the generated pass-through Makefile was missing + its trailing newline, which is now fixed. [Chip Salzenberg] + + - We now depend on YAML version at least 0.35 and at most version + 0.49, so that we don't pick up a new (and backward-incompatible) beta + version from CPAN. + + - Squashed a warning in t/basic.t about '"Foo::Module::VERSION" used + only once', and one in PPMMaker about $^V being undefined. [Blair + Zajac] + + - Added a couple temporary output files from HTML documentation + generation to the cleanup list. [Toby Ovod-Everett] + + - The PodParser module will now only extract paragraphs in the + 'AUTHOR' section of the pod if they contain an '@' character. This + tends to do a better job, heuristically speaking, of returning + relevant stuff. + + - Added regression tests and a helper method ( add_build_elements() ) + for adding new elements to the build process. Also some + documentation. + + - Wrote a recipe in the Cookbook for adding new elements to the build + process, and a recipe for changing the order in which the steps in + the build process will occur. + +0.25 Sun Apr 25 11:12:36 CDT 2004 + + - During the 'distdir' action, if no MANIFEST.SKIP file exists, we + will now create a reasonable default one. [Randy Sims] + + - In Makefile compatibility mode, some arguments (like UNINST, + TEST_VERBOSE, etc.) given to 'make' are now recognized and passed + through to Module::Build. [Randy Sims] + + - The regression tests now make sure that several pass-through + Makefile.PL parameters are dealt with correctly. + + - Added support for the 'LIB' parameter to passthrough + Makefile.PLs. [Spotted by Jesse Erlbaum] + + - Passing a 'PREFIX' parameter to a passthrough Makefile.PL was + supposed to make it die with a helpful error message, but instead + it just ignored it and blindly tried to install to the wrong place. + This is now fixed. [Spotted by Jesse Erlbaum] + + - Added an extra_compiler_flags() accessor method. + + - If the 'recursive_test_files' option was turned on, the test files + weren't sorted, but returned in an apparently random order. Now + they're sorted. [Martyn Peck] + + - Documented the 'tar' and 'gzip' parameters to the 'dist' and + 'ppmdist' actions. + + - The generation of HTML documentation now works (it was accidentally + partially implemented with an itchy patch-application finger in + 0.24). [Randy Kobes] + + - Fixed a fatal bug when building META.yml with YAML.pm and + 'dynamic_config' is set. [Reported by Jaap Karssenberg] + + - Fixed some incorrect error messages that occurred when + compiling/linking C sources went awry. + + - If the author uses a custom builder subclass, that subclass will + now be loaded correctly in the passthrough Makefile.PL if the + author uses the 'small' or 'passthrough' Makefile.PL options in + Module::Build::Compat. [Martyn Peck and Jaap Karssenberg] + + - If the author uses a custom builder subclass created dynamically + through the subclass() method, passthrough Makefile.PLs (of type + 'passthrough' or 'small') didn't work properly, because the custom + builder module wouldn't be loaded at the right time. This has been + fixed. [Reported by Toby Ovod-Everett] + + - In M::B-generated 'traditional' Makefile.PLs, the entries in + 'PREREQ_PM' are now sorted ASCIIbetically rather than randomly. + + - The install_types() method will now return any additional types + given as 'install_path' arguments, as well as all elements of the + current 'install_sets' entry. This makes it easier to add new + types of installable objects to the mix. + + - As a consequence of the previous change, there is no longer any + need to have an explicit 'install_types' data member, so it has + been removed. + + - In the second example code for the Module::Build->subclass() + method, the Module::Build module needed to be loaded before calling + its methods. [John Peacock] + + - Fixed minor error in the POD structure of Module::Build and + Module::Build::Platform::VMS docs. + + +0.24 Wed Feb 25 15:57:00 CST 2004 + + - Fixed a problem with incude_dirs not being propagated to the 'ccs' + file when compiling XS files on Win32. [Randy Sims and Steve Hay] + + - In 0.23, Module::Build::Compat->fake_makefile() started choking + when no 'build_class' parameter was supplied in the Makefile.PL. + Since these Makefile.PLs still exist on CPAN, we now default + 'build_class' to 'Module::Build', which was the old 0.22 behavior + anyway. [Reported by Martin Titz and Jeremy Seitz] + + - Added documentation for the 'include_dirs' parameter to + new(). [Steve Hay] + + - Changed the no-op command on Win32 from 'rem' to 'rem>nul' inside + pass-through Makefiles. [Randy Sims] + + - The 'autosplit' parameter now accepts an array reference if + multiple files should be split. [Jaap Karssenberg] + + - find_perl_interpreter() will now use $^X (if absolute), $ENV{PATH} + (if $^X isn't absolute), and $Config{perlpath}, in that order. + Also, we now make darn sure the result is the same version of perl, + by checking Config::myconfig() for a match against the current + perl. [Reported by Edward Sabol] + + - Fixed a fatal error on Win32 (and any other platform that doesn't + define an installation location for Unix-style man pages) during + installation. + +0.23 Sun Feb 8 22:01:18 CST 2004 + + - Fixed a compatibility problem in pass-through Makefiles (created by + Module::Build::Compat). Some 'make' utilities (for example, BSD + make) didn't like a '@' by itself on a line, so we stole some + 'NOOP' code from MakeMaker to fix it. [Reported by Mathieu Arnold] + + - Added a 'ppm_dist' action, which just makes the PPD file and then + makes a tarball out of the blib/ directory. [Randy Sims] + + - The @INC of the parent process is now propagated to child processes + when processing *.PL files. [Reported by Jaap Karssenberg] + + - We now only attempt to fix the shebang line on a script if the + shebang line matches the regex /perl/i . This fixes some instances + where people put shell scripts in their distributions. [Jaap + Karssenberg] + + - We no longer generate a 'requires', 'recommends', 'conflicts', + etc. entry in the META.yml file if there's no data to go in it. + + - Added a documentation reference to Michael Schwern's wiki for tips + on conversion from MakeMaker to M::B. [Randy Sims] + + - If there are script_files, we now add EXE_FILES to the + 'traditional' Makefile.PL generated by M::B::Compat. [Suggested by + Yuval Kogman] + + - Documented the 'test_files' parameter to new(). [Reported by Tony + Bowden] + + - Fixed a problem in "Build help ", which didn't find the + correct help chunk if was the final element in a POD + list. [Jaap Karssenberg] + + - Fixed a problem in the get_action_docs() method which gave + incorrect results if the method was called more than once in the + same program. + + - Fixed a problem in which actions defined by user subclasses + wouldn't be available via the pass-through Makefiles created by + Module::Build::Compat. [Reported by Jaap Karssenberg] + + - We now use Data::Dumper instead of our own ad-hoc serialization + routines to create the 'traditional' Makefile.PL + arguments. [Suggested by Yuval Kojman] + +0.22 Sat Jan 10 22:05:39 CST 2004 + + - On Unixish platforms, the syntax "FOO=BAR /bin/baz arg arg" now + works when present in $Config{ld}. This solves a problem on Mac OS + X 10.3. [Reported by Adam Foxson] + + - The have_c_compiler() now also tests whether the linker seems to + work too. + + - Fixed a problem with creating the distribution tarball in which + permissions would usually be all read-only. We now use our own + file-copying routines rather than those in ExtUtils::Manifest, + because those do some annoying extra permissions-setting stuff for + no apparent reason. It makes me happy that this was a very very + easy patch to make. [Reported by Thomas Klausner] + + - The compile_c() method now includes $Config{cccdlflags} in its + command invocation. It's usually empty, but not always, so we + didn't notice for a while. [Richard Clamp] + + - On some platforms it's common to have a $Config{make} defined, but + no 'make' utility actually available. We now detect this and skip + some 'make' compatibility tests. [Randy Sims] + + - Fixed a spurious testing failure on non-Unix platforms that + happened because we accidentally call localize_file_path() on empty + strings in the test suite. [Spotted by Randy Sims on Windows] + + - Made the 'name', 'abstract', 'author', and 'version' properties + required when building a PPD file. [Spotted by Randy Sims, Dave + Rolsky, & Glenn Linderman] + + - When building a 'traditional' Makefile.PL with + Module::Build::Compat, we now use 'VERSION_FROM' when possible, + rather than always using 'VERSION'. This way the Makefile.PL + doesn't have to get modified every release. + + - Made some fixups to the 'PPM' info-file, improving compatibility + with ActiveState's PPM tools. [Randy Sims, Glenn Linderman] + + - The 'dist_author' property can now accept multiple authors, see the + docs for more info. [Randy Sims] + + - If the user doesn't have YAML.pm installed during ACTION_dist, we + now create a minimal YAML.pm anyway, without any dependency + information. + + - The 'distribution_type' field is no longer created in META.yml + files, in accordance with the finding made at the London CLPAN + meeting that it's essentially meaningless and ill-defined. + + - The 'dist' action now accepts an optional 'tar' parameter to use a + system utility for building the tarball, and a 'gzip' parameter for + compressing it. If these are used, Archive::Tar won't be invoked. + This was added because Archive::Tar is producing some very + non-cross-platform tarballs that many tar utilities can't handle. + + - During testing, if YAML.pm isn't installed, then we won't try + making a tarball either, since this would invoke YAML to create the + META.yml file. + + - Fixed a problem with chmod() being called incorrectly on MacOS + (i.e. MacPerl, not Mac OS X). [Spotted by Paul Sanford Toney] + + - Fixed a problem with the --config flag not being treated properly + (essentially ignored) on the command line for 'perl Build.PL' or + 'Build '. [Spotted by Jakub Bogusz] + + - Added a new config() method to get at the Build object's notion of + the %Config hash. + + - Test::Harness is starting to contend for the Most Crotchety Module + Award. Work around a few of its nits when setting harness + switches. [Spotted by Diab Jerius] + + - Now the Build script will die() if we're run from the wrong + directory, rather than trying to chdir() to what it thinks is the + right directory and do its work there. See + https://rt.cpan.org/Ticket/Display.html?id=4039 . [Chris Dolan] + + - Changed the manpage separator on OS/2 to '.'. [Ilya Zakharevich] + + - On OS/2, disable C compilation, since apparently it isn't working + there. [Reported by Ilya Zakharevich] + + - Inserted a comment into auto-generated Makefile.PLs saying it was + auto-generated. [Randy Sims] + + - Fixed some annoying behavior in generated passthrough Makefile.PLs + when the user chose not to install Module::Build, or if + installation failed. [Reported by Ilya Zakharevich and Richard + Clamp] + + - Moved the documentation for 'codebase' to the section where it's + relevant. [Randy Sims, Glenn Linderman] + + - Fixed a have_c_compiler() failure on some platforms, we now define + a boot_compilet() function (since we're compiling a library, not an + executable). [Randy Sims] + + - Added a recipe to the Module::Build::Cookbook describing how to + maintain compatibility with older versions of CPAN.pm [Jim Cromie] + + - Removed caveat about "looking for alternatives" in how hashes are + specified on the command line, since an alternative has been found. + + - Previously most warnings about optional prerequisites looked like + they were actually error messages about required prerequisites. + This has been corrected. [Reported again by Sagar Shah] + + - Added support for building XS (and C in general) stuff on AIX. + This was done by a small reorganization of prelink_c() method from + Windows.pm to Build.pm, and it is only invoked for the platforms + that need it invoked. AIX also massages some very naughty bits + (MakeMaker macro variables) in $Config{lddlflags} that should never + have been put there, but alas, they're there, so we find & resolve + them. + + - Added OS/2 ($^O = 'os2') to the list of Unix-like platforms. This + basically means that most platform-specific operations will be done + in a Unix-like manner. + + - Pass-through Makefiles will now die() when they're given a PREFIX + parameter, and suggest using 'destdir' or 'install_base' instead. + Previously they just ignored the parameter and tried to install to + the default location, which is clearly not what the user wanted. + + - Updated my email address in the documentation to a more recent + variant. + + - Add NetBSD to the list of Unix-like systems. [Adrian Bunk] + + - Add SVR5 to the list of Unix-like systems. [Rafael Garcia-Suarez] + + - We now use Pod::Parser to find the ABSTRACT and AUTHOR when it's + available on the system. [initial patch by Randy Sims] + + - Fixed a little scalar/list buglet in a documentation example. + +0.21 Wed Oct 15 20:47:05 CDT 2003 + + - Added a have_c_compiler() method. + + - Added documentation for the requires(), recommends(), + build_requires(), and conflicts() methods. + + - On Unix platforms, we now create the "Build" script with a #! line + matching the perl interpreter that was used to invoke the Build.PL + script, rather than whatever is in $Config{startperl}. This avoids + a potential warning about the interpreters not matching. [Spotted + by Ken Y. Clark] + + - The Unix version now uses the safer multi-argument form of system() + when building distribution tarballs. + + - Added a regression test for the 'dist' action to the t/runthrough.t + test. + + - Fixed a problem with File::Spec usage when creating the names of + 'libdoc' manual pages - the code wasn't dealing with the volume or + file portions correctly on certain platforms. + + - When creating the names of the 'libdoc' manual pages, we no longer + assume that pods are under the hard-coded paths 'blib/lib' or + 'blib/arch'. + + - Fixed a crashing bug that could sometimes occur when the + distribution contained no 'lib' directory. [Chris Dolan] + + - Fixed a crashing bug that happened when the user had .PL files in + the lib/ directory and didn't explicitly name them in a hash + reference to the new() constructor. [Chris Reinhardt, bug #4036] + + - .PL files are now passed the names of their target file(s) on the + command line when they run. + + - When YAML.pm wasn't installed, t/runthrough.t wasn't properly + skipping some tests that required YAML. This is now fixed. + [Stephen J. Smith] + + - Added documentation for the dist_version() and dist_name() + methods. [Spotted by Johan Vromans] + + - Existing values in $ENV{HARNESS_PERL_SWITCHES} are now respected + and not squashed when we run the 'test' action. [Paul Johnson] + + - On cygwin, the separator string for manual page names has been set + to '.'. Previously it was '::', inherited from Unix. [Yitzchak + Scott-Thoennes] + + - Avoid a warning when Build.PL is run (i.e. when the new() method is + called) and no MANIFEST file exists. [Michael Schwern and Kevin + Ruscoe] + + - Added documentation for the 'code' and 'docs' actions. [Steve + Purkis and Mark Stosberg] + + - The internal method compile_support_files() has been renamed to + process_support_files() in order to make it consistent with other + processing methods. Note that it was never documented using the + old name. It's still not documented, actually. Maybe later. + + - Skip the 'write' pseudo-entry in the 'diff' action's installation + map. [Chris Dolan] + + - Fixed a bug in which notes() set in the Build.PL before + create_build_script() was called would get lost unless more notes() + were also set afterwards. [Spotted by Dave Rolsky] + + - The process of building elements of the distribution is now driven + by a list of build elements, paving the way for letting people add + their own types of build elements in future versions of + Module::Build (or in the current version with some difficulty). + + - Fixed some linking errors on Cygwin. [Randy Sims, Terrence Brannon] + + - Fixed a line-ending problem with detecting the dist_abstract + properly on Cygwin. [Randy Sims] + + - Fixed a problem with signatures that occurred if 'distsign' was + called before 'distdir' - the signature would be generated twice. + + - Added a 'create_readme' parameter to new(), which will use + Pod::Text to generate a README from the main (dist_version_from) + module file during the 'distdir' action. + + - We now refuse to run the 'Build' script if it was created using a + different version of Module::Build. This has caused a couple of + nasty bugs in the past, I don't want to know what it would cause in + the future. + + - Documentation for do_system() has been added. [Dave Rolsky] + + - run_perl_script() is now available as a class method, though it + will need to (re-)find the perl interpreter in this case. + + - Added a new_from_context() method that authors of automated tools + like CPANPLUS and CPAN can use instead of running all tasks as + sub-processes. We also use it in the regression tests for + Module::Build itself. ** Note that this method is currently + undocumented because its name may change in the future. ** + + - When signing distributions with Module::Signature, we now + automatically add the SIGNATURE file to the MANIFEST, avoiding an + unpleasant chicken/egg problem for the module author. + [unpleasantness spotted by sungo] + + - In Module::Build::Compat, added support for the 'verbose' parameter + to Makefile.PL [spotted by Soren Andersen, fixed by Michael + Schwern] + + - The Module::Build distribution now has a cryptographic 'SIGNATURE' + file created by Module::Signature. + + - Added proper documentation for the subclass() method. [spotted by + Jonathan Steinert] + + - Worked around a Config.pm bug in Red Hat 9 which prevented man + pages from being installed in the correct places. [spotted by Ville + Skytta] + + - Fixed a Module::Build::Compat bug in which setting INSTALLDIRS + caused a crash. [spotted by Ilya Martynov] + +0.20 Tue Aug 26 14:34:07 CDT 2003 + + - Separated the 'build' action into two separate actions, 'code' and + 'docs'. This is similar to MakeMaker's separation of the 'all' + target into 'pure_all' and 'manifypods'. This fixes a permissions + hassle in which doing 'sudo Build install' would often create local + doc files that needed superuser permissions to delete. + + - Enhanced the 'help' action - 'Build help foo' will now show the POD + documentation for the 'foo' action. + + - Added a notes() feature, which helps share data transparently + between the Build.PL and t/*.t scripts. + + - The installation process will now create man(1) and man(3) pages + from POD in modules & scripts, and install them. We don't build + man pages when there's nowhere to install them, such as on some + Win32 or most Mac systems. [large patch by Steve Purkis, 5.005 fix + by Mathieu Arnold] + + - The 'distdir' action now copies files to the distribution + directory, rather than making them hard links to the original + files. This allows authors to do last-minute alterations of the + files without affecting the originals. [Dave Rolsky] + + - If the author uses XS files in nonstandard locations, the copied + versions of those files will now be cleaned up properly. + + - In invoking the 'test' action or invoking 'xsubpp', we now use the + same perl executable as we use everywhere else, rather than blindly + using $^X or $Config{perlpath} (neither of which are very + reliable). + + - Fixed a problem with the 'install_path' parameter given to + 'Build.PL' being lost in subsequent actions. [Reported by Mathieu + Arnold] + + - Fixed yet another bug with installation directories, in which the + 'install_base' parameter wasn't being respected on the command + line. [Spotted by Jonathan Swartz] + + - Changed the way the depends_on() method works inside action + subroutines - now each action will only run once per dispatch() + invocation (similar to how perl's require() function works). This + helps avoid some difficult problems with dependency loops. + + - Changed the documentation for the 'autosplit' parameter to give + reasons why it may not be a good idea to use, but no longer + threaten to remove it. [Suggested by Martyn J. Pearce] + + - Improved the formatting of the 'traditional' Makefile.PL generated + by Module::Build::Compat->create_makefile_pl. [Michael Schwern] + + - The 'traditional' Makefile.PL will now use the 'module_name' + parameter (as NAME) if it's available, otherwise it will continue + to use the 'dist_name' (as DISTNAME). [Michael Schwern] + + - Created read/write accessor methods for all our 'properties'. + [Michael Schwern] + + - The 'test_files' parameter can now be specified using glob() syntax + (i.e. 't/*.t'), and the corresponding test_files() method is now a + read/write accessor. + + - The location of the 'blib' directory is now a property of the Build + object - nobody is likely to notice this change, with any luck, but + it makes the design and code cleaner. + + - The 'disttest' and 'distsign' methods now chdir() back to the + directory where they started, rather than to the base_dir of the + build. + + - Improved comparisons of version strings containing underscore + characters (indicating "beta" status). [Steve Purkis] + + - Added documentation for the 'dist_author', 'dist_abstract', and + 'codebase' parameters to new(), and for the 'ppd' action. [Dave + Rolsky] + + - Added documentation for the up_to_date() and contains_pod() + methods. [Dave Rolsky] + + - 'traditional' pass-through Makefile.PLs will now contain an + INSTALLDIRS parameter matching the Build.PL's 'installdirs' + setting. + + - version_from_file() now ignores $VERSION variables that are defined + in POD or comments. It can still be tricked by $VERSIONs in string + literals, though. [Steve Purkis] + + - The code to find packages in module files now uses Steve's scanning + method (above) to skip package-declaration-lookalikes in POD or + comments. + + - The 'disttest' action will now propagate its @INC settings to its + subprocesses. + +0.19 Wed Jul 9 22:34:02 CDT 2003 + + - Added support for the 'install_path' parameter, which allows custom + specification of where things should be installed. This is a major + improvement to Module::Build's functionality. + + - Added the 'install_base' parameter. Provides an easy way to + install to local or alternative directory trees. + + - We now install scripts by default to $Config{installsitebin} + instead of $Config{installscript}. Neither is a great choice, but + the former is likely to be [analogous to] /usr/local/bin, and the + latter is likely to be [something like] /usr/bin . If/when there's + a $Config{installsitescript}, we'll start using that automatically. + + - Fixed a problem on Win32 in which C and XS files wouldn't be + compiled properly, and the user would see an error about 'Can't + locate object method "format_compiler_cmd"'. + (http://rt.cpan.org/Ticket/Display.html?id=2391) + + - We now use the correct perl interpreter (via + Module::Build->find_perl_interpreter) in pass-through makefiles. + + - The t/compat.t test now uses $Config{make} instead of just 'make' + to test makefile compatibility. This fixes some failures on Win32. + We also skip this test entirely if no make utility is available. + + - Alternative distribution layouts are now supported via the + 'pm_files', 'pod_files', 'xs_files', 'PL_files', and 'script_files' + parameters to new(). This should help people transition from + MakeMaker, and might even help us write an automatic transition + tool. + + - Added tests to t/runthrough.t that check to see installation is + happening correctly. + + - Added experimental code to build a .ppd file, in support of + ActiveState's "Perl Package Manager". [original patch by Dave + Rolsky] + + - For authors who use Module::Signature to sign their distributions, + we now create the SIGNATURE file right in the distribution + directory, rather than creating it in the top-level directory and + copying it into place. This solves problems related to having + files get out of date with respect to their signatures. + + - We now don't depend on Module::Info to scan for packages during the + 'dist' action anymore, because it's way too aggressive about + loading other modules that you may not want loaded. We now just + (ick, yuck) scan the .pm files with a regular expression to find + "package Foo::Bar;" statements. + + - Silenced some annoying copyright/logo output from Microsoft 'nmake' + during Makefile compatibility testing. [Randy W. Sims] + + - Command-line arguments may now either be specified using the syntax + '--foo foovalue' as well as the traditional syntax 'foo=foovalue'. + The former is often more convenient for shell tab-completion when + the value is a filename (as in 'Build test --test_files t/basic.t'). + + - Command-line arguments may now include non-named parameters, which + make some actions more natural. For instance, the 'diff' action + may now be invoked as 'Build diff -u' rather than as + 'Build diff flags=-u'. + + - Pass-through Makefile.PLs now convert unknown Makefile.PL + parameters to lower-case and hand them to Build.PL, rather than + ignoring them. This means we only have to account for the + differences in the interface, not the entire interface, in + translating parameters. + + - We now issue a warning & don't proceed if asked to make a distdir + and there's no MANIFEST or it's empty. + + - Moved INSTALL to INSTALL.txt to increase compatibility with various + odd versions of 'make' during 'make install' on case-insensitive + filesystems (like nmake on Win32, often). Only affects the + Makefile compatibility layer. [reported by Andrew Savige] + + - Module::Build->known_actions() now works as a class method. + + - Pass-through makefiles now list each action individually rather + than using a ".DEFAULT" catch-all. This improves compatibility + with 'nmake' on Win32, and probably some other less common 'make' + dialects. [Andrew Savige] + + - We're now more aggressive about testing the pass-through makefiles, + e.g. making sure they can run 'all' and 'test' targets, and making + sure the Makefile itself actually exists. + + - Fixed a problem with check_installed_status() when installed + version contains non-numeric characters like underscores. + + - Fixed a problem with a bareword 'File::Spec' in one of the test + scripts that caused it not to compile under 5.8.0 (but is fine + under 5.6). + + - Fixed a problem with the 'destdir' installation parameter on + platforms that have volume identifiers in path names (like "C:" on + Win32). The identifier is now stripped from installation + directories before prepending the destdir path. The destdir path + may still have a volume identifier on it. + + - Added an 'add_to_cleanup' parameter to new() that calls + add_to_cleanup() immediately for the given files. + + - The distribution directory (e.g. Sample-Module-0.13/ ) will now be + deleted during the 'clean' or 'realclean' actions. + + - During testing of modules, blib/lib and blib/arch are now added as + absolute paths, not relative. This helps tests that load the + modules at runtime and may change the current working directory + (like Module::Build itself does during testing). + + - The $Config{cc} entry on some people's systems is something like + 'ccache gcc', so we now split that string using split_like_shell(). + [Richard Clamp] + + - Added documentation for 'extra_linker_flags' parameter, and added a + corresponding 'extra_compiler_flags' parameter. [original patch by + Richard Clamp] + + - The pass-through Makefile created by Module::Build::Compat now + supports MakeMaker options like POLLUTE=1 and INC. We also just + warn & skip when we see any unknown MM parameters, rather than + dying. [Dave Rolsky] + + - Fixed an error about how @INC and $ENV{PERL5LIB} interact during + the testing of M::B itself. [jk ] + + - The pass-through Makefile doesn't include 'recommended' M::B + dependencies in the Makefile anymore, since they're not strictly + necessary. In particular, this makes installing M::B itself + easier. + + - A new 'create_makefile_pl' parameter lets you use + Module::Build::Compat during the 'distdir' (or 'dist') action to + automatically create a Makefile.PL for compatibility with + ExtUtils::MakeMaker. The parameter's value should be one of the + styles named in the Module::Build::Compat documentation. + + - When compiling C code, we now respect 'pollute' and 'inc' + parameters. (XXX - needs docs) [Dave Rolsky] + + - Made the creation of the "install map" more generic. (XXX - needs + documentation) + + - Fixed a problem in which add_to_cleanup() didn't note cleanup files + unless create_build_script() had been called already. [Dave Rolsky] + + - During 'Build dist', we no longer have to load each .pm file (via + Module::Info) to determine the $VERSION numbers inside. Instead, + we call our internal version_from_file() method, which is the same + thing MakeMaker and PAUSE and search.cpan.org do. Also fixes a + failure when Module::Info is installed in a nonstandard directory. + [reported by Teun Burgers] + + - Fixed some failing test code on Windows - open files can't be + deleted. [Andrew Savige] + + - The Cygwin platform is now treated as a flavor of Unix rather than + a flavor of Windows. [chocolateboy] + + - We're now more aggressive about adding temporary C compilation + files (*.c, *.bs) to the cleanup list. [Dave Rolsky] + + - When constructing the list in META.yml of packages provided by this + distribution, we now use the same rules as the PAUSE scanner does + when a single .pm file contains multiple VERSIONs. [Andreas Koenig] + + - check_installed_status() now works as both a class method and an + object method (and is documented so). [Spotted by Dave Rolsky] + +0.18 Tue Apr 8 13:24:23 CDT 2003 + + - We now rewrite the shebang lines of scripts ourselves, rather than + relying on MakeMaker routines to do it. MakeMaker changed the way + this happened (not the result, but where the code lived) a few + times. [Suggested by Richard Clamp] + + - The scripts() method has changed to script_files(), and likewise + the 'scripts' parameter has changed to 'script_files'. The old + names can still be used for backward compatibility. + + - Support for the 'scripts' parameter (which is now 'script_files') + was broken in 0.17, now it's fixed. [Richard Clamp] + + - We now recommend ExtUtils::ParseXS 2.02, which will fail to load + with perl 5.005 or earlier (which is proper, because it doesn't + work with those versions). When it fails to load, we still fall + back to using the xsubpp script for XS parsing. [spotted by Dave + Rolsky, fix suggested by Richard Clamp] + + - Now works on VMS - the Build script's shebang-line-equivalent + wasn't being formed correctly there - though just about everything + else worked fine. [Tested & patched by Michael Schwern] + + - Eliminated a warning that occurred if 'perl Build.PL' or the + check_installed_status() method was run with -w. [Spotted by + Michael Schwern] + +0.17 Sat Mar 29 18:06:01 CST 2003 + + - Now works under perl 5.005_03. [Richard Clamp] + + - When building blib/ , .PL files are now processed before doing + anything else. This means .PL files can be used in any of the + other contexts. + + - The locating and processing of .pm, .pod, .xs, .PL files and script + files are now isolated into their own methods. This is aimed + toward providing a stable interface for this stuff, so they can be + overridden, parameterized, etc. They're not quite stable yet, + though. + + - The internal lib_to_blib() method has gone away, because processing + is now done by smaller specialized methods. This method had some + duplicate assumptions about filenames that it's nice to get rid of. + + - .PL files are no longer automatically processed in the c_source + directory, they must be specified manually in a 'PL_files' + parameter. + + - Mention in the docs that it's useful to do "PL_FILES => {}" in a + Makefile.PL if you're using both a Makefile.PL and a + Build.PL. [Dom] + + - Add several options to the 'license' field, so that we're in better + sync with PAUSE and CPAN options. [Andreas Koenig] + + - Created a find_perl_interpreter() method that tries to locate the + currently executing perl interpreter. Following a suggestion from + Nicholas Clark for Inline, we prefer an absolute + path in $^X, then an existent path in $Config{perlpath}, then + whatever's in $^X. + + - Use the aforementioned perl to run scripts in run_perl_script(). + This fixes the spurious warning "WARNING: Configuration was + initially created with 'foo', but we are now using 'bar'" that + appeared a lot in version 0.16. + + +0.16 Mon Feb 24 13:06:47 CST 2003 + + - All three C compilers that perl supports on Windows environments + (MSVC, BCC, and GCC) are now supported by Module::Build. We now + reportedly pass all tests on Windows. [Randy W. Sims] + + - The test t/xs.t, which tests building of XS modules, will be + skipped if no C compiler is found. [suggested by Randy W. Sims] + + - The "install" action accepts new "destdir" [motivated by Michael + Schwern and Chip Salzenberg] and "uninst" parameters [by Dave + Rolsky]. The former prepends an arbitrary directory to all + installation paths (useful for package management), and the latter + will tell ExtUtils::Install to remove any differing files that are + "shadowing" the stuff you're installing from a different location, + just like MakeMaker's "make install UNINST=1" command will do. + + - Made changes to the generated Makefile in Module::Build::Compat + that much better support Windows platforms [after suggestions by + James Freeman] + + - Added experimental support for creating distribution SIGNATURE + files via Module::Signature. [Dave Rolsky] + + - Added experimental support for installing via the "only.pm" module, + which allows loading specific versions of modules. Since this + module is so new, the interface may still be changing. [Brian + Ingerson] + + - Added support for installing executable scripts, via the 'scripts' + parameter to new(), and the scripts() accessor method. + + - Fix an infinite loop that occurred when doing 'perl Build.PL + config="foo=bar"' + + - Fix up the formatting of the error message the user gets when + prereqs aren't satisfied. + +0.15 Fri Jan 17 15:00:24 CST 2003 + + - In link_c(), extra object files were mistakenly being treated as + output files, not input files, in the up-to-date check. Fixed. + + - In up_to_date(), don't make an unnecessary copy of the file lists + when they're specified as array references. + + - Split off the C compilation phase into its own method, + compile_support_files(), for easier subclassing. + + - Start a stub of a 'manifypods' action. + + - Compiler optimizations weren't being included in C compilation + statements. Fixed. + + - The 'extra_linker_flags' parameter wasn't being honored. Fixed. + + - The 'ccflags' Config.pm entry wasn't being properly split into + separate arguments. Fixed. + + +0.14 Fri Dec 13 14:06:29 AEST 2002 + + - Added support for MacPerl (Mac OS version 9 and below), which (as + far as I know) was never natively supported by MakeMaker. Still + lacks support for the 'test' action (because Test::Harness + requires forking, which MacPerl won't do) and compiling XS/C files + (because I don't know how to invoke a compiler on MacOS, and one + may not even be available). This change is brought to you by + Michael Schwern and the letter '('. + + - Improved processing of .xs files. Now we use the new + ExtUtils::ParseXS module if it's available, otherwise we use + backticks and write the result to a .c file ourselves. This + avoids the need to do cross-platform shell redirection. + + - Make sure all parts of 'Build test' use the not-yet-installed + version of Module::Build. This only affects the tests for this + module, not any of the module code itself. [Spotted by Schwern] + + - Oopsie - use $Config{ld} instead of $Config{cc} for linking. + + - Added a 'diff' action, which is useful for comparing the details + of what you're about to install with what is already installed on + your system. This uses File::Compare, which is in the core. + + - Fixed a problem on Windows in which the _build/ directory wasn't + getting deleted during the 'realclean' action, because we had a + file open in that directory. [Spotted by Michael Schwern] + + - delete_filetree() now always uses File::Path::rmtree(), regardless + of whether the thing being deleted is a file or a directory. This + helps remove things on obscure platforms with strange locking + rules (or even not so obscure ones like MacOS). It also now + reports the number of files or directories deleted (without + recursing directory contents). + + - rm_previous_build_script() is gone, replaced by calls to + delete_filetree(). + + - 'Build' now chdir()s in a BEGIN block, so the 'use Module::Build' + statement will work correctly. Solves a problem on MacOS, where + the 'Build' script may often be invoked from the wrong working + directory. [Fix by Michael Schwern] + + - Internally we now use the multi-argument form of system() to run + external commands (such as 'diff' or 'cc') whenever possible (and + whenever we can't avoid system() altogether). Note that this + means we have to handle splitting some strings (such as + $Config{ccflags}) into argument lists like the shell would, which + is a drag. However, the alternative would be to handle shell + quoting of all arguments to commands ourselves, which is an even + bigger drag across platforms and involves arbitrary filenames and + so on. + + - To handle the argument splitting mentioned above, a method + split_like_shell() has been created. So far it's just doing naive + processing. In practice, I've yet to actually see a %Config entry + that uses quotes & spaces, so the splitting task is usually not + very error-prone. + + - The 'test' action now takes a 'test_files' parameter, similar to + the (undocumented) ExtUtils::MakeMaker TEST_FILES argument. Handy + during development when fixing bugs. + + - Internally, the rscan_dir() method can now accept a predicate + function that decides whether a file/directory should be matched. + + - We now issue a warning message when the author hasn't specified a + license type. + +0.13 Wed Nov 20 20:07:53 AEST 2002 + + - 'cleanup' file lists are now written immediately, rather than at + program termination. This helps avoid "phantom files" that don't + get handled by the 'realclean' action. The internal + write_cleanup() method (which was never documented) is now gone. + + - The 'blib/' directory is now properly cleaned up in more (all?) + circumstances. Previously it could become a phantom if + create_build_script() was never called. + + - Now scan the 'c_source' directory for .cpp (C++) files as well as + .c files, and compiles them. + + - Use a 'phony' target for 'make manifest' in the pass-through + Makefile, for the same reason as 'make install' (see version 0.12 + notes below). + + - Module::Build::Compat now accepts any known Config.pm key and + passes it through to the Build.PL. Fixes a problem with CPANPLUS, + which was passing INSTALLMAN1DIR. + + - The file 'META.yaml' has been re-named to 'META.yml' in order to + cooperate better with systems that can only handle 3 characters + after the dot. + + - The t/xs.t test should give more informative error messages upon + failure. + +0.12 Thu Nov 14 18:31:47 AEST 2002 + + - The META.yaml file was erroneously looking for 'build_depends' + instead of 'build_requires'. [spotted by Iain Truskett] + + - Add prompt() and y_n() methods for use in Build.PLs + + - Do more to work with all versions of Test::Harness when setting + the TEST_VERBOSE flag and running under the debugger [patch by + Dave Rolsky] + + - Include a test for verbosity handling + + - Make sure the blib/ directory is always cleaned up with the + 'clean' or 'realclean' action. + + - In a pass-through Makefile.PL, inform 'make' that 'install' is a + "fake target", so that it works properly on case-insensitive + filesystems like HFS+ with distributions that contain an INSTALL + file. [patch by Brian Ingerson] + + - In Module::Build::Compat, show an example Makefile.PL that can + install Module::Build and re-invoke itself in one fell swoop [Dave + Rolsky and Autrijus Tang] + + - Improve the formatting of the Module::Build and + Module::Build::Compat documentation. + +0.11 Fri Aug 23 18:50:46 AEST 2002 + + - 'module_version' and 'module_version_from' have been replaced by + 'dist_version' and 'dist_version_from', which is what they really + meant in the first place. 'dist_name' has been added. + + - 'module_name' is now just a way to set 'dist_name' and + 'dist_version_from' in a convenient way. + + - The 'name' in META.yaml is now the distribution name, not the + (incorrect) module name. [spotted by Graham Barr] + + - Added the check_installed_status() and prereq_failures() methods + for checking prerequisite information with the programmatic + interface + + - check_installed_version() now uses check_installed_status() + internally + + - Documented the create_build_script() method, which had escaped + documentation. + + - create_build_script() now writes prerequisite information to the + _build/ directory, for use by Module::Build::Compat. + + - Module::Build::Compat has documentation for a safer way to write a + dummy Makefile.PL. [patch by Autrijus Tang] + +0.10 Wed Aug 7 19:36 2002 + - Recommend YAML 0.35 instead of 0.30. + + - Don't die during 'Build disttest' if YAML isn't installed. This + fixes tests 5-10 in runthrough.t if YAML isn't installed. + + - Die if an unknown license type is used, but still default to + 'unknown' if no license is specified. + + - Use YAML::DumpFile() if we're using a recent YAML, + YAML::StoreFile() otherwise. + + - Show specific error messages in runthrough.t. + + - Add a generated_by entry to the META.yaml file. + + - Skip a few tests if YAML isn't installed. + +0.09 Fri Jun 28 11:07:08 EST 2002 + + - The 'distdir' action wasn't deleting the distribution directory + before building it again. This meant that, say, if you did 'Build + disttest' then 'Build dist', you'd end up with a blib/ directory + in your distribution. I actually had this happen for version + 0.08, and it's not nice to distribute a blib/ on CPAN. + + - We now keep track of the 'base_dir', i.e. the top-level build + directory, so we can change back into it if we change out of it. + This necessitated a cwd() method, which uses the Cwd.pm module. + I'm aware of Cwd's limitations, particularly under taint-mode, but + I don't know a way around using it here. + + - The 'dist_dir' action now changes back into 'base_dir' directory. + + - We now do write_config() inside the create_build_script() method, + not inside the new() method. + + - Simplified the find_version() method, and improved its error + messages. + + - Renamed module_name_to_file() to find_module_by_name(), and added + a parameter specifying the directories to search in. Previously + we searched in 'lib' and @INC, which wasn't correct in all + situations. + + - Patched the docs to change "Build test" to "./Build test" + [Elizabeth Mattijsen] + +0.08 Wed Jun 26 20:30:56 EST 2002 + + - Fixed the 'prereq' alias for the 'requires' parameter + + - Added some tests in t/basic.t to test the dependency checking + + - Added 'artistic' as a licensing option [Arthur Bergman] + + - Fixed some bugs in requires/prereq/recommends/conflicts/build_depends + + - Fixed a typo in the 'distclean' action that prevented its + execution [Arthur Bergman] + + - Separated the linking phase of building XS items into its own + link_c() method. Its interface is still unstable, so it's not + documented yet. [suggested by Arthur Bergman] + +0.07 Jun 9 2002 15:46 + + - We now generate a 'META.yaml' metadata file during 'Build dist'. + This can be very useful for lots of things, none of which are + implemented yet. + + - Added a 'dynamic_config' parameter, defaulting to false. This + lets distribution systems (CPAN.pm, etc.) build, test, and install + "easy" modules without having to execute the Build.PL at runtime. + It's also a guarantee that the list of dependencies is exactly + what is present in the metadata file, and won't be changed during + the build process. + + - Added support for "recommended" and "build-time requirement" + modules, besides those that are absolutely required. Also added a + "conflicts" field. + + - Changed the 'prereq' field to 'requires' (the old name will + continue to work). + + - Added support for checking the installed version of perl as an + explicit dependency. + + - Added a 'license' parameter to specify one of a fixed number of + licenses for the distribution. + + - Fixed a bug in Module::Build::Compat that was preventing arguments + from being processed properly. [patch by Ilya Martynov] + + - Make sure we're in the right directory when we write the cleanup + file, since various ExtUtils::Install errors might leave us in an + unknown directory. [patch by Ilya Martynov] + + - Specified the 'license', 'recommends', and 'dynamic_config' + values in Build.PL, and changed 'prereq' to 'requires'. + +0.06 Apr 2 2002 17:44 + + - Added the Module::Build::Compat module for assisting and + explaining compatibility with ExtUtils::Makemaker and cohorts. + + - State is now saved using Data::Dumper instead of my ad-hoc + mechanism, guaranteeing data integrity. Whitespace values broke + in the former scheme. + + - Added the 'recommended' option, which works like 'prereq' but + isn't insistent. + + - Separated the various parameters into three groups: parameters + that tell Module::Build what to do, Config.pm parameters, and + user-defined parameters for each build (the module author is the + 'user' here). This helps avoid conflicts between names, and it + was silly to have them all together. The three groups of + parameters are subject to the same rules for overriding: values + specified during a Build action take precedence over values + specified at 'perl Build.PL' time, which in turn take precedence + over values specified in the call to new(). + + - Improved support for .PL files. Any .PL file in the lib/ + directory or the directory specified by 'c_source' will now get + properly executed. I also added a 'PL_files' parameter that you + can use in case the .PL doesn't create an obviously-named output + file. + + - If a prerequisite condition is malformed, we now report a prereq + failure and say why. Previously we issued a warning and kept + going. + + +0.05 10-Jan-2002 20:26 + - Added the Module::Build->subclass() method, which makes it easier to + make quick-and-dirty subclasses of Module::Build. + + - Reorganized the docs a bit. + + - Added the 'testdb' action, and the 'debugger=1' argument to the + 'test' action, both of which run tests under the perl + debugger. (idea: Dave Rolsky) + + - Added prerequisite checking (Dave Rolsky) + + - Fixed an unlikely-to-occur bug with misquoted strings in the + 'Build' script (spot: Dave Rolsky) + + - We're more careful about shush-ing warnings that + ExtUtils::Manifest might emit (Dave Rolsky) + + - The 'help' action now auto-generates the list of actions (Dave Rolsky) + + - Added the 'distcheck', 'skipcheck', 'distclean', 'distdir', and + 'disttest' actions (Dave Rolsky) + + - We're a little more aggressive about cleaning up temporary files - + we'll try to clean them up even when we don't have write permission + on them. This isn't as dastardly as it sounds; if we /really/ + don't have permission, we won't be able to remove them no matter + how hard we try. + +0.04 Fri Nov 16 16:55 2001 + - Added a 'manifest' action. It's just like MakeMaker's 'make manifest', it + brings your MANIFEST file up to date with your distribution directory. + + - Reorganized some of the responsibilities of various methods, which + allows modules to be built and tested programmatically. + + - The 'clean' action will now clean up files that were created more + recently than the on-disk cleanup registry was written. + + - Undefined values from Config.pm are handled correctly now. + + - The dispatch() method will now accept explicit dispatch + parameters, for use in a programmatic setting. + + - $ENV{TEST_VERBOSE} will be set in test scripts if the 'verbose=1' + parameter is set. + + - Moved the test.pl script to t/basic.t + + - Created the t/xs.t script, which tests building a module with a + .xs component. + + - Fixed the loading of $^O-specific modules (there were no such + modules before). + + - Added a 'darwin' platform module, which removes -flat_namespace + from $Config{ccflags} while building .xs modules (it's a linker + flag, not a compiler flag). + + - Now uses $^W instead of the 'warnings' pragma, which apparently + provides compatibility with perl 5.005 (I've only tested it with + 5.6.x myself). + + - If a file called C exists in the top-level directory, + this file will be executed as a Perl script during 'Build test' and + its output will be shown to the user. This is a good place to put + speed tests or other tests that don't use the C format + for output. + + - The 'Build install' step will now put .xs-related things in the + correct architecture-dependent libraries. + + - Added the 'autosplit' option, even though I think autosplitting is + a load of hooie. + +0.03 Sun Nov 11 14:58 CDT 2001 + - The 'perl Build.PL' step will now detect whether the current + environment is "unixish", "windowsish", etc., and load the correct + module (i.e. Module::Build::Platform::Unix). More specific + modules may also be written for particular values of $^O. + + - Module::Build will now process any .xs files in the lib/ + directory. Please let me know whether this works or not with your + distribution & platform. I'll be trying out various distributions + on my platform. + + - Corrected some embarassing errors in the POD documentation. Also + added a long documentation section on the various build actions + (test, install, build, etc.) and added some neato ASCII art. + + - Added a 'cleanup' mechanism - any method may call the + $self->add_to_cleanup(@files) method to register files which need + to be cleaned up during 'Build clean'. + + - Added a 'Build help' action that gives a little syntax help, and + lists all the actions available. + + - Fixed a bug in which 'blib/' wasn't properly being added to @INC + when running 'Build test'. + + - For the 'Build dist' action, we'll use the 'tar' and 'gzip' + programs (as specified by Config.pm) on Unix platforms, otherwise + we'll use Archive::Tar and Compress::Zlib. + +0.02 Wed Sep 5 00:53:04 CDT 2001 + - Added POD documentation. + + - Added the 'install', 'fakeinstall', and 'dist' actions. + + - new() will now determine version string based on 'module_version', or + 'module_version_from', or 'module_name', in that order. + + - Module::Build::Base handles its file paths in a platform-independent + way, using the File:: modules + + +0.01 Sun Aug 5 01:23:10 2001 + - original version; created by h2xs 1.1.1.4 with options -XA -n Module::Build + diff --git a/INSTALL b/INSTALL new file mode 100644 index 0000000..aef676c --- /dev/null +++ b/INSTALL @@ -0,0 +1,24 @@ + Installation instructions for Module::Build + +To install this module, just do: + + perl Build.PL + ./Build + ./Build test + ./Build install (this step may need to be done as the superuser) + +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 + Build test + Build install + +The important thing is that the "Build" script gets executed and that +you pass it the "test", "install", etc. arguments. + +There's heaps more information in the README and in the documentation +of the various packages in this distribution. + + -Ken diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..999480a --- /dev/null +++ b/LICENSE @@ -0,0 +1 @@ +FULLTEXT \ No newline at end of file diff --git a/MANIFEST b/MANIFEST new file mode 100644 index 0000000..08cda4d --- /dev/null +++ b/MANIFEST @@ -0,0 +1,97 @@ +bin/config_data +Build.PL +Changes +contrib/bash_completion.module-build +inc/bootstrap.pl +inc/MBVersion.pm +inc/Module/Metadata.pm +inc/Perl/OSType.pm +INSTALL +lib/Module/Build.pm +lib/Module/Build/API.pod +lib/Module/Build/Authoring.pod +lib/Module/Build/Base.pm +lib/Module/Build/Bundling.pod +lib/Module/Build/Compat.pm +lib/Module/Build/Config.pm +lib/Module/Build/Cookbook.pm +lib/Module/Build/Dumper.pm +lib/Module/Build/Notes.pm +lib/Module/Build/Platform/aix.pm +lib/Module/Build/Platform/cygwin.pm +lib/Module/Build/Platform/darwin.pm +lib/Module/Build/Platform/Default.pm +lib/Module/Build/Platform/MacOS.pm +lib/Module/Build/Platform/os2.pm +lib/Module/Build/Platform/Unix.pm +lib/Module/Build/Platform/VMS.pm +lib/Module/Build/Platform/VOS.pm +lib/Module/Build/Platform/Windows.pm +lib/Module/Build/PodParser.pm +lib/Module/Build/PPMMaker.pm +LICENSE +Makefile.PL +MANIFEST +META.json +META.yml +README +t/00-compile.t +t/actions/installdeps.t +t/actions/manifest_skip.t +t/add_property.t +t/add_property_array.t +t/add_property_hash.t +t/basic.t +t/bundle_inc.t +t/bundled/Software/License.pm +t/bundled/Tie/CPHash.pm +t/compat.t +t/compat/exit.t +t/debug.t +t/destinations.t +t/ext.t +t/extend.t +t/files.t +t/help.t +t/install.t +t/install_extra_target.t +t/lib/DistGen.pm +t/lib/MBTest.pm +t/lib/Module/Signature.pm +t/lib/Software/License/VaporWare.pm +t/manifypods.t +t/manifypods_with_utf8.t +t/metadata.t +t/metadata2.t +t/mymeta.t +t/new_from_context.t +t/notes.t +t/par.t +t/parents.t +t/perl_mb_opt.t +t/PL_files.t +t/pod_parser.t +t/ppm.t +t/properties/dist_suffix.t +t/properties/license.t +t/properties/module_name.t +t/properties/needs_compiler.t +t/properties/release_status.t +t/properties/requires.t +t/properties/share_dir.t +t/README.pod +t/resume.t +t/runthrough.t +t/sample.t +t/script_dist.t +t/signature.t +t/test_file_exts.t +t/test_reqs.t +t/test_type.t +t/test_types.t +t/tilde.t +t/unit_run_test_harness.t +t/use_tap_harness.t +t/versions.t +t/write_default_maniskip.t +t/xs.t diff --git a/META.json b/META.json new file mode 100644 index 0000000..a835d0e --- /dev/null +++ b/META.json @@ -0,0 +1,157 @@ +{ + "abstract" : "Build and install Perl modules", + "author" : [ + "Ken Williams ", + "Module-Build mailing list at ." + ], + "dynamic_config" : 1, + "generated_by" : "Module::Build version 0.4214", + "license" : [ + "perl_5" + ], + "meta-spec" : { + "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", + "version" : "2" + }, + "name" : "Module-Build", + "prereqs" : { + "build" : { + "requires" : { + "CPAN::Meta::YAML" : "0.003", + "File::Temp" : "0.15", + "Parse::CPAN::Meta" : "1.4401", + "Test::Harness" : "3.16", + "Test::More" : "0.49" + } + }, + "configure" : { + "requires" : { + "CPAN::Meta" : "2.142060", + "Module::Metadata" : "1.000002", + "Perl::OSType" : "1", + "version" : "0.87" + } + }, + "runtime" : { + "recommends" : { + "ExtUtils::Install" : "0.3", + "ExtUtils::Manifest" : "1.54" + }, + "requires" : { + "CPAN::Meta" : "2.142060", + "Cwd" : "0", + "Data::Dumper" : "0", + "ExtUtils::CBuilder" : "0.27", + "ExtUtils::Install" : "0", + "ExtUtils::Manifest" : "0", + "ExtUtils::Mkbootstrap" : "0", + "ExtUtils::ParseXS" : "2.21", + "File::Basename" : "0", + "File::Compare" : "0", + "File::Copy" : "0", + "File::Find" : "0", + "File::Path" : "0", + "File::Spec" : "0.82", + "Getopt::Long" : "0", + "Module::Metadata" : "1.000002", + "Perl::OSType" : "1", + "Pod::Man" : "2.17", + "Test::Harness" : "0", + "Text::Abbrev" : "0", + "Text::ParseWords" : "0", + "perl" : "5.008000", + "version" : "0.87" + } + } + }, + "provides" : { + "Module::Build" : { + "file" : "lib/Module/Build.pm", + "version" : "0.4214" + }, + "Module::Build::Base" : { + "file" : "lib/Module/Build/Base.pm", + "version" : "0.4214" + }, + "Module::Build::Compat" : { + "file" : "lib/Module/Build/Compat.pm", + "version" : "0.4214" + }, + "Module::Build::Config" : { + "file" : "lib/Module/Build/Config.pm", + "version" : "0.4214" + }, + "Module::Build::Cookbook" : { + "file" : "lib/Module/Build/Cookbook.pm", + "version" : "0.4214" + }, + "Module::Build::Dumper" : { + "file" : "lib/Module/Build/Dumper.pm", + "version" : "0.4214" + }, + "Module::Build::Notes" : { + "file" : "lib/Module/Build/Notes.pm", + "version" : "0.4214" + }, + "Module::Build::PPMMaker" : { + "file" : "lib/Module/Build/PPMMaker.pm", + "version" : "0.4214" + }, + "Module::Build::Platform::Default" : { + "file" : "lib/Module/Build/Platform/Default.pm", + "version" : "0.4214" + }, + "Module::Build::Platform::MacOS" : { + "file" : "lib/Module/Build/Platform/MacOS.pm", + "version" : "0.4214" + }, + "Module::Build::Platform::Unix" : { + "file" : "lib/Module/Build/Platform/Unix.pm", + "version" : "0.4214" + }, + "Module::Build::Platform::VMS" : { + "file" : "lib/Module/Build/Platform/VMS.pm", + "version" : "0.4214" + }, + "Module::Build::Platform::VOS" : { + "file" : "lib/Module/Build/Platform/VOS.pm", + "version" : "0.4214" + }, + "Module::Build::Platform::Windows" : { + "file" : "lib/Module/Build/Platform/Windows.pm", + "version" : "0.4214" + }, + "Module::Build::Platform::aix" : { + "file" : "lib/Module/Build/Platform/aix.pm", + "version" : "0.4214" + }, + "Module::Build::Platform::cygwin" : { + "file" : "lib/Module/Build/Platform/cygwin.pm", + "version" : "0.4214" + }, + "Module::Build::Platform::darwin" : { + "file" : "lib/Module/Build/Platform/darwin.pm", + "version" : "0.4214" + }, + "Module::Build::Platform::os2" : { + "file" : "lib/Module/Build/Platform/os2.pm", + "version" : "0.4214" + }, + "Module::Build::PodParser" : { + "file" : "lib/Module/Build/PodParser.pm", + "version" : "0.4214" + } + }, + "release_status" : "stable", + "resources" : { + "license" : [ + "http://dev.perl.org/licenses/" + ], + "repository" : { + "url" : "https://github.com/Perl-Toolchain-Gang/Module-Build" + }, + "x_IRC" : "irc://irc.perl.org/#toolchain", + "x_MailingList" : "mailto:module-build@perl.org" + }, + "version" : "0.4214" +} diff --git a/META.yml b/META.yml new file mode 100644 index 0000000..10ebce8 --- /dev/null +++ b/META.yml @@ -0,0 +1,114 @@ +--- +abstract: 'Build and install Perl modules' +author: + - 'Ken Williams ' + - 'Module-Build mailing list at .' +build_requires: + CPAN::Meta::YAML: '0.003' + File::Temp: '0.15' + Parse::CPAN::Meta: '1.4401' + Test::Harness: '3.16' + Test::More: '0.49' +configure_requires: + CPAN::Meta: '2.142060' + Module::Metadata: '1.000002' + Perl::OSType: '1' + version: '0.87' +dynamic_config: 1 +generated_by: 'Module::Build version 0.4214, CPAN::Meta::Converter version 2.143240' +license: perl +meta-spec: + url: http://module-build.sourceforge.net/META-spec-v1.4.html + version: '1.4' +name: Module-Build +provides: + Module::Build: + file: lib/Module/Build.pm + version: '0.4214' + Module::Build::Base: + file: lib/Module/Build/Base.pm + version: '0.4214' + Module::Build::Compat: + file: lib/Module/Build/Compat.pm + version: '0.4214' + Module::Build::Config: + file: lib/Module/Build/Config.pm + version: '0.4214' + Module::Build::Cookbook: + file: lib/Module/Build/Cookbook.pm + version: '0.4214' + Module::Build::Dumper: + file: lib/Module/Build/Dumper.pm + version: '0.4214' + Module::Build::Notes: + file: lib/Module/Build/Notes.pm + version: '0.4214' + Module::Build::PPMMaker: + file: lib/Module/Build/PPMMaker.pm + version: '0.4214' + Module::Build::Platform::Default: + file: lib/Module/Build/Platform/Default.pm + version: '0.4214' + Module::Build::Platform::MacOS: + file: lib/Module/Build/Platform/MacOS.pm + version: '0.4214' + Module::Build::Platform::Unix: + file: lib/Module/Build/Platform/Unix.pm + version: '0.4214' + Module::Build::Platform::VMS: + file: lib/Module/Build/Platform/VMS.pm + version: '0.4214' + Module::Build::Platform::VOS: + file: lib/Module/Build/Platform/VOS.pm + version: '0.4214' + Module::Build::Platform::Windows: + file: lib/Module/Build/Platform/Windows.pm + version: '0.4214' + Module::Build::Platform::aix: + file: lib/Module/Build/Platform/aix.pm + version: '0.4214' + Module::Build::Platform::cygwin: + file: lib/Module/Build/Platform/cygwin.pm + version: '0.4214' + Module::Build::Platform::darwin: + file: lib/Module/Build/Platform/darwin.pm + version: '0.4214' + Module::Build::Platform::os2: + file: lib/Module/Build/Platform/os2.pm + version: '0.4214' + Module::Build::PodParser: + file: lib/Module/Build/PodParser.pm + version: '0.4214' +recommends: + ExtUtils::Install: '0.3' + ExtUtils::Manifest: '1.54' +requires: + CPAN::Meta: '2.142060' + Cwd: '0' + Data::Dumper: '0' + ExtUtils::CBuilder: '0.27' + ExtUtils::Install: '0' + ExtUtils::Manifest: '0' + ExtUtils::Mkbootstrap: '0' + ExtUtils::ParseXS: '2.21' + File::Basename: '0' + File::Compare: '0' + File::Copy: '0' + File::Find: '0' + File::Path: '0' + File::Spec: '0.82' + Getopt::Long: '0' + Module::Metadata: '1.000002' + Perl::OSType: '1' + Pod::Man: '2.17' + Test::Harness: '0' + Text::Abbrev: '0' + Text::ParseWords: '0' + perl: '5.008000' + version: '0.87' +resources: + IRC: irc://irc.perl.org/#toolchain + MailingList: mailto:module-build@perl.org + license: http://dev.perl.org/licenses/ + repository: https://github.com/Perl-Toolchain-Gang/Module-Build +version: '0.4214' diff --git a/Makefile.PL b/Makefile.PL new file mode 100644 index 0000000..489985d --- /dev/null +++ b/Makefile.PL @@ -0,0 +1,16 @@ +# This Makefile.PL creates a pass-through Makefile that simply calls +# the equivalent Module::Build methods for each make target. See the +# documentation for Module::Build::Compat for more information. + +use 5.006001; + + +use lib qw(lib); + +# bootstrap configure_requires prereqs +BEGIN { do 'inc/bootstrap.pl' or die defined($@) ? $@ : $! } + +use Module::Build::Compat; + +Module::Build::Compat->run_build_pl(args => \@ARGV); +Module::Build::Compat->write_makefile(build_class => 'Module::Build'); diff --git a/README b/README new file mode 100644 index 0000000..db6ec6a --- /dev/null +++ b/README @@ -0,0 +1,901 @@ +NAME + Module::Build - Build and install Perl modules + +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 + Build test + Build install + +DESCRIPTION + "Module::Build" is a system for building, testing, and installing Perl + modules. It is meant to be an alternative to "ExtUtils::MakeMaker". + Developers may alter the behavior of the module through subclassing in a + much more straightforward way than with "MakeMaker". It also does not + require a "make" on your system - most of the "Module::Build" code is + pure-perl and written in a very cross-platform way. + + See "MOTIVATIONS" for more comparisons between "ExtUtils::MakeMaker" and + "Module::Build". + + To install "Module::Build", and any other module that uses + "Module::Build" for its installation process, do the following: + + perl Build.PL # 'Build.PL' script creates the 'Build' script + ./Build # Need ./ to ensure we're using this "Build" script + ./Build test # and not another one that happens to be in the PATH + ./Build install + + 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: + + + + You can run the 'help' action for a complete list of actions. + +GUIDE TO DOCUMENTATION + The documentation for "Module::Build" is broken up into sections: + + General Usage (Module::Build) + This is the document you are currently reading. It describes basic + usage and background information. Its main purpose is to assist the + user who wants to learn how to invoke and control "Module::Build" + scripts at the command line. + + Authoring Reference (Module::Build::Authoring) + This document describes the structure and organization of + "Module::Build", and the relevant concepts needed by authors who are + writing Build.PL scripts for a distribution or controlling + "Module::Build" processes programmatically. + + API Reference (Module::Build::API) + This is a reference to the "Module::Build" API. + + Cookbook (Module::Build::Cookbook) + This document demonstrates how to accomplish many common tasks. It + covers general command line usage and authoring of Build.PL scripts. + Includes working examples. + +ACTIONS + There are some general principles at work here. First, each task when + building a module is called an "action". These actions are listed above; + they correspond to the building, testing, installing, packaging, etc., + tasks. + + Second, arguments are processed in a very systematic way. Arguments are + always key=value pairs. They may be specified at "perl Build.PL" time + (i.e. "perl Build.PL destdir=/my/secret/place"), in which case their + values last for the lifetime of the "Build" script. They may also be + specified when executing a particular action (i.e. "Build test + verbose=1"), in which case their values last only for the lifetime of + that command. Per-action command line parameters take precedence over + parameters specified at "perl Build.PL" time. + + The build process also relies heavily on the "Config.pm" module. If the + user wishes to override any of the values in "Config.pm", she may + specify them like so: + + perl Build.PL --config cc=gcc --config ld=gcc + + The following build actions are provided by default. + + build + [version 0.01] + + If you run the "Build" script without any arguments, it runs the + "build" action, which in turn runs the "code" and "docs" actions. + + This is analogous to the "MakeMaker" *make all* target. + + clean + [version 0.01] + + This action will clean up any files that the build process may have + created, including the "blib/" directory (but not including the + "_build/" directory and the "Build" script itself). + + code + [version 0.20] + + This action builds your code base. + + By default it just creates a "blib/" directory and copies any ".pm" + and ".pod" files from your "lib/" directory into the "blib/" + directory. It also compiles any ".xs" files from "lib/" and places + them in "blib/". Of course, you need a working C compiler (probably + the same one that built perl itself) for the compilation to work + properly. + + The "code" action also runs any ".PL" files in your lib/ directory. + Typically these create other files, named the same but without the + ".PL" ending. For example, a file lib/Foo/Bar.pm.PL could create the + file lib/Foo/Bar.pm. The ".PL" files are processed first, so any + ".pm" files (or other kinds that we deal with) will get copied + correctly. + + config_data + [version 0.26] + + ... + + diff + [version 0.14] + + This action will compare the files about to be installed with their + installed counterparts. For .pm and .pod files, a diff will be shown + (this currently requires a 'diff' program to be in your PATH). For + other files like compiled binary files, we simply report whether + they differ. + + A "flags" parameter may be passed to the action, which will be + passed to the 'diff' program. Consult your 'diff' documentation for + the parameters it will accept - a good one is "-u": + + ./Build diff flags=-u + + dist + [version 0.02] + + This action is helpful for module authors who want to package up + their module for source distribution through a medium like CPAN. It + will create a tarball of the files listed in MANIFEST and compress + the tarball using GZIP compression. + + By default, this action will use the "Archive::Tar" module. However, + you can force it to use binary "tar" and "gzip" executables by + supplying an explicit "tar" (and optional "gzip") parameter: + + ./Build dist --tar C:\path\to\tar.exe --gzip C:\path\to\zip.exe + + distcheck + [version 0.05] + + Reports which files are in the build directory but not in the + MANIFEST file, and vice versa. (See manifest for details.) + + distclean + [version 0.05] + + Performs the 'realclean' action and then the 'distcheck' action. + + distdir + [version 0.05] + + Creates a "distribution directory" named "$dist_name-$dist_version" + (if that directory already exists, it will be removed first), then + copies all the files listed in the MANIFEST file to that directory. + This directory is what the distribution tarball is created from. + + distinstall + [version 0.37] + + Performs the 'distdir' action, then switches into that directory and + runs a "perl Build.PL", followed by the 'build' and 'install' + actions in that directory. Use PERL_MB_OPT or .modulebuildrc to set + options that should be applied during subprocesses + + distmeta + [version 0.21] + + Creates the META.yml file that describes the distribution. + + META.yml is a file containing various bits of *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 META.yml in a simplified YAML + format. + + META.yml file must also be listed in MANIFEST - if it's not, a + warning will be issued. + + The current version of the META.yml specification can be found on + CPAN as CPAN::Meta::Spec. + + distsign + [version 0.16] + + Uses "Module::Signature" to create a SIGNATURE file for your + distribution, and adds the SIGNATURE file to the distribution's + MANIFEST. + + disttest + [version 0.05] + + Performs the 'distdir' action, then switches into that directory and + runs a "perl Build.PL", followed by the 'build' and 'test' actions + in that directory. Use PERL_MB_OPT or .modulebuildrc to set options + that should be applied during subprocesses + + docs + [version 0.20] + + This will generate documentation (e.g. Unix man pages and HTML + documents) for any installable items under blib/ that contain POD. + If there are no "bindoc" or "libdoc" installation targets defined + (as will be the case on systems that don't support Unix manpages) no + action is taken for manpages. If there are no "binhtml" or "libhtml" + installation targets defined no action is taken for HTML documents. + + fakeinstall + [version 0.02] + + This is just like the "install" action, but it won't actually do + anything, it will just report what it *would* have done if you had + actually run the "install" action. + + help + [version 0.03] + + This action will simply print out a message that is meant to help + you use the build process. It will show you a list of available + build actions too. + + With an optional argument specifying an action name (e.g. "Build + help test"), the 'help' action will show you any POD documentation + it can find for that action. + + html + [version 0.26] + + This will generate HTML documentation for any binary or library + files under blib/ that contain POD. The HTML documentation will only + be installed if the install paths can be determined from values in + "Config.pm". You can also supply or override install paths on the + command line by specifying "install_path" values for the "binhtml" + and/or "libhtml" installation targets. + + With an optional "html_links" argument set to a false value, you can + skip the search for other documentation to link to, because that can + waste a lot of time if there aren't any links to generate anyway: + + ./Build html --html_links 0 + + install + [version 0.01] + + This action will use "ExtUtils::Install" to install the files from + "blib/" into the system. See "INSTALL PATHS" for details about how + Module::Build determines where to install things, and how to + influence this process. + + If you want the installation process to look around in @INC for + other versions of the stuff you're installing and try to delete it, + you can use the "uninst" parameter, which tells "ExtUtils::Install" + to do so: + + ./Build install uninst=1 + + This can be a good idea, as it helps prevent multiple versions of a + module from being present on your system, which can be a confusing + situation indeed. + + installdeps + [version 0.36] + + This action will use the "cpan_client" parameter as a command to + install missing prerequisites. You will be prompted whether to + install optional dependencies. + + The "cpan_client" option defaults to 'cpan' but can be set as an + option or in .modulebuildrc. It must be a shell command that takes a + list of modules to install as arguments (e.g. 'cpanp -i' for + CPANPLUS). If the program part is a relative path (e.g. 'cpan' or + 'cpanp'), it will be located relative to the perl program that + executed Build.PL. + + /opt/perl/5.8.9/bin/perl Build.PL + ./Build installdeps --cpan_client 'cpanp -i' + # installs to 5.8.9 + + manifest + [version 0.05] + + This is an action intended for use by module authors, not people + installing modules. It will bring the MANIFEST up to date with the + files currently present in the distribution. You may use a + MANIFEST.SKIP file to exclude certain files or directories from + inclusion in the MANIFEST. MANIFEST.SKIP should contain a bunch of + regular expressions, one per line. If a file in the distribution + directory matches any of the regular expressions, it won't be + included in the MANIFEST. + + The following is a reasonable MANIFEST.SKIP starting point, you can + add your own stuff to it: + + ^_build + ^Build$ + ^blib + ~$ + \.bak$ + ^MANIFEST\.SKIP$ + CVS + + See the distcheck and skipcheck actions if you want to find out what + the "manifest" action would do, without actually doing anything. + + 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. + + manpages + [version 0.28] + + This will generate man pages for any binary or library files under + blib/ that contain POD. The man pages will only be installed if the + install paths can be determined from values in "Config.pm". You can + also supply or override install paths by specifying there values on + the command line with the "bindoc" and "libdoc" installation + targets. + + pardist + [version 0.2806] + + Generates a PAR binary distribution for use with PAR or PAR::Dist. + + It requires that the PAR::Dist module (version 0.17 and up) is + installed on your system. + + ppd [version 0.20] + + Build a PPD file for your distribution. + + This action takes an optional argument "codebase" which is used in + the generated PPD file to specify the (usually relative) URL of the + distribution. By default, this value is the distribution name + without any path information. + + Example: + + ./Build ppd --codebase "MSWin32-x86-multi-thread/Module-Build-0.21.tar.gz" + + ppmdist + [version 0.23] + + Generates a PPM binary distribution and a PPD description file. This + action also invokes the "ppd" action, so it can accept the same + "codebase" argument described under that action. + + This uses the same mechanism as the "dist" action to tar & zip its + output, so you can supply "tar" and/or "gzip" parameters to affect + the result. + + prereq_data + [version 0.32] + + This action prints out a Perl data structure of all prerequisites + and the versions required. The output can be loaded again using + "eval()". This can be useful for external tools that wish to query a + Build script for prerequisites. + + prereq_report + [version 0.28] + + This action prints out a list of all prerequisites, the versions + required, and the versions actually installed. This can be useful + for reviewing the configuration of your system prior to a build, or + when compiling data to send for a bug report. + + pure_install + [version 0.28] + + This action is identical to the "install" action. In the future, + though, when "install" starts writing to the file + $(INSTALLARCHLIB)/perllocal.pod, "pure_install" won't, and that will + be the only difference between them. + + realclean + [version 0.01] + + This action is just like the "clean" action, but also removes the + "_build" directory and the "Build" script. If you run the + "realclean" action, you are essentially starting over, so you will + have to re-create the "Build" script again. + + retest + [version 0.2806] + + This is just like the "test" action, but doesn't actually build the + distribution first, and doesn't add blib/ to the load path, and + therefore will test against a *previously* installed version of the + distribution. This can be used to verify that a certain installed + distribution still works, or to see whether newer versions of a + distribution still pass the old regression tests, and so on. + + skipcheck + [version 0.05] + + Reports which files are skipped due to the entries in the + MANIFEST.SKIP file (See manifest for details) + + test + [version 0.01] + + This will use "Test::Harness" or "TAP::Harness" to run any + regression tests and report their results. Tests can be defined in + the standard places: a file called "test.pl" in the top-level + directory, or several files ending with ".t" in a "t/" directory. + + If you want tests to be 'verbose', i.e. show details of test + execution rather than just summary information, pass the argument + "verbose=1". + + If you want to run tests under the perl debugger, pass the argument + "debugger=1". + + If you want to have Module::Build find test files with different + file name extensions, pass the "test_file_exts" argument with an + array of extensions, such as "[qw( .t .s .z )]". + + If you want test to be run by "TAP::Harness", rather than + "Test::Harness", pass the argument "tap_harness_args" as an array + reference of arguments to pass to the TAP::Harness constructor. + + In addition, if a file called "visual.pl" exists in the top-level + directory, this file will be executed as a Perl script and its + output will be shown to the user. This is a good place to put speed + tests or other tests that don't use the "Test::Harness" format for + output. + + To override the choice of tests to run, you may pass a "test_files" + argument whose value is a whitespace-separated list of test scripts + to run. This is especially useful in development, when you only want + to run a single test to see whether you've squashed a certain bug + yet: + + ./Build test --test_files t/something_failing.t + + You may also pass several "test_files" arguments separately: + + ./Build test --test_files t/one.t --test_files t/two.t + + or use a "glob()"-style pattern: + + ./Build test --test_files 't/01-*.t' + + testall + [version 0.2807] + + [Note: the 'testall' action and the code snippets below are + currently in alpha stage, see + "/www.nntp.perl.org/group/perl.module.build/2007/03/msg584.html"" in + "http: ] + + Runs the "test" action plus each of the "test$type" actions defined + by the keys of the "test_types" parameter. + + Currently, you need to define the ACTION_test$type method yourself + and enumerate them in the test_types parameter. + + my $mb = Module::Build->subclass( + code => q( + sub ACTION_testspecial { shift->generic_test(type => 'special'); } + sub ACTION_testauthor { shift->generic_test(type => 'author'); } + ) + )->new( + ... + test_types => { + special => '.st', + author => ['.at', '.pt' ], + }, + ... + + testcover + [version 0.26] + + Runs the "test" action using "Devel::Cover", generating a + code-coverage report showing which parts of the code were actually + exercised during the tests. + + To pass options to "Devel::Cover", set the $DEVEL_COVER_OPTIONS + environment variable: + + DEVEL_COVER_OPTIONS=-ignore,Build ./Build testcover + + testdb + [version 0.05] + + This is a synonym for the 'test' action with the "debugger=1" + argument. + + testpod + [version 0.25] + + This checks all the files described in the "docs" action and + produces "Test::Harness"-style output. If you are a module author, + this is useful to run before creating a new release. + + testpodcoverage + [version 0.28] + + This checks the pod coverage of the distribution and produces + "Test::Harness"-style output. If you are a module author, this is + useful to run before creating a new release. + + versioninstall + [version 0.16] + + ** Note: since "only.pm" is so new, and since we just recently added + support for it here too, this feature is to be considered + experimental. ** + + If you have the "only.pm" module installed on your system, you can + use this action to install a module into the version-specific + library trees. This means that you can have several versions of the + same module installed and "use" a specific one like this: + + use only MyModule => 0.55; + + To override the default installation libraries in "only::config", + specify the "versionlib" parameter when you run the "Build.PL" + script: + + perl Build.PL --versionlib /my/version/place/ + + To override which version the module is installed as, specify the + "version" parameter when you run the "Build.PL" script: + + perl Build.PL --version 0.50 + + See the "only.pm" documentation for more information on + version-specific installs. + +OPTIONS + Command Line Options + The following options can be used during any invocation of "Build.PL" or + the Build script, during any action. For information on other options + specific to an action, see the documentation for the respective action. + + NOTE: There is some preliminary support for options to use the more + familiar long option style. Most options can be preceded with the "--" + long option prefix, and the underscores changed to dashes (e.g. + "--use-rcfile"). Additionally, the argument to boolean options is + optional, and boolean options can be negated by prefixing them with "no" + or "no-" (e.g. "--noverbose" or "--no-verbose"). + + quiet + Suppress informative messages on output. + + verbose + Display extra information about the Build on output. "verbose" will + turn off "quiet" + + cpan_client + Sets the "cpan_client" command for use with the "installdeps" + action. See "installdeps" for more details. + + use_rcfile + Load the ~/.modulebuildrc option file. This option can be set to + false to prevent the custom resource file from being loaded. + + allow_mb_mismatch + Suppresses the check upon startup that the version of Module::Build + we're now running under is the same version that was initially + invoked when building the distribution (i.e. when the "Build.PL" + script was first run). As of 0.3601, a mismatch results in a warning + instead of a fatal error, so this option effectively just suppresses + the warning. + + debug + Prints Module::Build debugging information to STDOUT, such as a + trace of executed build actions. + + Default Options File (.modulebuildrc) + [version 0.28] + + When Module::Build starts up, it will look first for a file, + $ENV{HOME}/.modulebuildrc. If it's not found there, it will look in the + .modulebuildrc file in the directories referred to by the environment + variables "HOMEDRIVE" + "HOMEDIR", "USERPROFILE", "APPDATA", "WINDIR", + "SYS$LOGIN". If the file exists, the options specified there will be + used as defaults, as if they were typed on the command line. The + defaults can be overridden by specifying new values on the command line. + + The action name must come at the beginning of the line, followed by any + amount of whitespace and then the options. Options are given the same as + they would be on the command line. They can be separated by any amount + of whitespace, including newlines, as long there is whitespace at the + beginning of each continued line. Anything following a hash mark ("#") + is considered a comment, and is stripped before parsing. If more than + one line begins with the same action name, those lines are merged into + one set of options. + + Besides the regular actions, there are two special pseudo-actions: the + key "*" (asterisk) denotes any global options that should be applied to + all actions, and the key 'Build_PL' specifies options to be applied when + you invoke "perl Build.PL". + + * verbose=1 # global options + diff flags=-u + install --install_base /home/ken + --install_path html=/home/ken/docs/html + installdeps --cpan_client 'cpanp -i' + + If you wish to locate your resource file in a different location, you + can set the environment variable "MODULEBUILDRC" to the complete + absolute path of the file containing your options. + + Environment variables + MODULEBUILDRC + [version 0.28] + + Specifies an alternate location for a default options file as + described above. + + PERL_MB_OPT + [version 0.36] + + Command line options that are applied to Build.PL or any Build + action. The string is split as the shell would (e.g. whitespace) and + the result is prepended to any actual command-line arguments. + +INSTALL PATHS + [version 0.19] + + When you invoke Module::Build's "build" action, it needs to figure out + where to install things. The nutshell version of how this works is that + default installation locations are determined from Config.pm, and they + may be overridden by using the "install_path" parameter. An + "install_base" parameter lets you specify an alternative installation + root like /home/foo, and a "destdir" lets you specify a temporary + installation directory like /tmp/install in case you want to create + bundled-up installable packages. + + Natively, Module::Build provides default installation locations for the + following types of installable items: + + lib Usually pure-Perl module files ending in .pm. + + arch + "Architecture-dependent" module files, usually produced by compiling + XS, Inline, or similar code. + + script + Programs written in pure Perl. In order to improve reuse, try to + make these as small as possible - put the code into modules whenever + possible. + + bin "Architecture-dependent" executable programs, i.e. compiled C code + or something. Pretty rare to see this in a perl distribution, but it + happens. + + bindoc + Documentation for the stuff in "script" and "bin". Usually generated + from the POD in those files. Under Unix, these are manual pages + belonging to the 'man1' category. + + libdoc + Documentation for the stuff in "lib" and "arch". This is usually + generated from the POD in .pm files. Under Unix, these are manual + pages belonging to the 'man3' category. + + binhtml + This is the same as "bindoc" above, but applies to HTML documents. + + libhtml + This is the same as "libdoc" above, but applies to HTML documents. + + Four other parameters let you control various aspects of how + installation paths are determined: + + installdirs + The default destinations for these installable things come from + entries in your system's "Config.pm". You can select from three + different sets of default locations by setting the "installdirs" + parameter as follows: + + 'installdirs' set to: + core site vendor + + uses the following defaults from Config.pm: + + lib => installprivlib installsitelib installvendorlib + arch => installarchlib installsitearch installvendorarch + script => installscript installsitescript installvendorscript + bin => installbin installsitebin installvendorbin + bindoc => installman1dir installsiteman1dir installvendorman1dir + libdoc => installman3dir installsiteman3dir installvendorman3dir + binhtml => installhtml1dir installsitehtml1dir installvendorhtml1dir [*] + libhtml => installhtml3dir installsitehtml3dir installvendorhtml3dir [*] + + * Under some OS (eg. MSWin32) the destination for HTML documents is + determined by the C entry C. + + The default value of "installdirs" is "site". If you're creating + vendor distributions of module packages, you may want to do + something like this: + + perl Build.PL --installdirs vendor + + or + + ./Build install --installdirs vendor + + If you're installing an updated version of a module that was + included with perl itself (i.e. a "core module"), then you may set + "installdirs" to "core" to overwrite the module in its present + location. + + (Note that the 'script' line is different from "MakeMaker" - + unfortunately there's no such thing as "installsitescript" or + "installvendorscript" entry in "Config.pm", so we use the + "installsitebin" and "installvendorbin" entries to at least get the + general location right. In the future, if "Config.pm" adds some more + appropriate entries, we'll start using those.) + + install_path + Once the defaults have been set, you can override them. + + On the command line, that would look like this: + + perl Build.PL --install_path lib=/foo/lib --install_path arch=/foo/lib/arch + + or this: + + ./Build install --install_path lib=/foo/lib --install_path arch=/foo/lib/arch + + install_base + You can also set the whole bunch of installation paths by supplying + the "install_base" parameter to point to a directory on your system. + For instance, if you set "install_base" to "/home/ken" on a Linux + system, you'll install as follows: + + lib => /home/ken/lib/perl5 + arch => /home/ken/lib/perl5/i386-linux + script => /home/ken/bin + bin => /home/ken/bin + bindoc => /home/ken/man/man1 + libdoc => /home/ken/man/man3 + binhtml => /home/ken/html + libhtml => /home/ken/html + + Note that this is *different* from how "MakeMaker"'s "PREFIX" + parameter works. "install_base" just gives you a default layout + under the directory you specify, which may have little to do with + the "installdirs=site" layout. + + The exact layout under the directory you specify may vary by system + - we try to do the "sensible" thing on each platform. + + destdir + If you want to install everything into a temporary directory first + (for instance, if you want to create a directory tree that a package + manager like "rpm" or "dpkg" could create a package from), you can + use the "destdir" parameter: + + perl Build.PL --destdir /tmp/foo + + or + + ./Build install --destdir /tmp/foo + + This will effectively install to "/tmp/foo/$sitelib", + "/tmp/foo/$sitearch", and the like, except that it will use + "File::Spec" to make the pathnames work correctly on whatever + platform you're installing on. + + prefix + Provided for compatibility with "ExtUtils::MakeMaker"'s PREFIX + argument. "prefix" should be used when you want Module::Build to + install your modules, documentation, and scripts in the same place + as "ExtUtils::MakeMaker"'s PREFIX mechanism. + + The following are equivalent. + + perl Build.PL --prefix /tmp/foo + perl Makefile.PL PREFIX=/tmp/foo + + Because of the complex nature of the prefixification logic, the + behavior of PREFIX in "MakeMaker" has changed subtly over time. + Module::Build's --prefix logic is equivalent to the PREFIX logic + found in "ExtUtils::MakeMaker" 6.30. + + The maintainers of "MakeMaker" do understand the troubles with the + PREFIX mechanism, and added INSTALL_BASE support in version 6.31 of + "MakeMaker", which was released in 2006. + + If you don't need to retain compatibility with old versions + (pre-6.31) of "ExtUtils::MakeMaker" or are starting a fresh Perl + installation we recommend you use "install_base" instead (and + "INSTALL_BASE" in "ExtUtils::MakeMaker"). See "Installing in the + same location as ExtUtils::MakeMaker" in Module::Build::Cookbook for + further information. + +MOTIVATIONS + There are several reasons I wanted to start over, and not just fix what + I didn't like about "MakeMaker": + + * I don't like the core idea of "MakeMaker", namely that "make" should + be involved in the build process. Here are my reasons: + + + When a person is installing a Perl module, what can you assume + about their environment? Can you assume they have "make"? No, + but you can assume they have some version of Perl. + + + When a person is writing a Perl module for intended + distribution, can you assume that they know how to build a + Makefile, so they can customize their build process? No, but you + can assume they know Perl, and could customize that way. + + For years, these things have been a barrier to people getting the + build/install process to do what they want. + + * There are several architectural decisions in "MakeMaker" that make + it very difficult to customize its behavior. For instance, when + using "MakeMaker" you do "use ExtUtils::MakeMaker", but the object + created in "WriteMakefile()" is actually blessed into a package name + that's created on the fly, so you can't simply subclass + "ExtUtils::MakeMaker". There is a workaround "MY" package that lets + you override certain "MakeMaker" methods, but only certain + explicitly preselected (by "MakeMaker") methods can be overridden. + Also, the method of customization is very crude: you have to modify + a string containing the Makefile text for the particular target. + Since these strings aren't documented, and *can't* be documented + (they take on different values depending on the platform, version of + perl, version of "MakeMaker", etc.), you have no guarantee that your + modifications will work on someone else's machine or after an + upgrade of "MakeMaker" or perl. + + * It is risky to make major changes to "MakeMaker", since it does so + many things, is so important, and generally works. "Module::Build" + is an entirely separate package so that I can work on it all I want, + without worrying about backward compatibility with "MakeMaker". + + * Finally, Perl is said to be a language for system administration. + Could it really be the case that Perl isn't up to the task of + building and installing software? Even if that software is a bunch + of ".pm" files that just need to be copied from one place to + another? My sense was that we could design a system to accomplish + this in a flexible, extensible, and friendly manner. Or die trying. + +TO DO + The current method of relying on time stamps to determine whether a + derived file is out of date isn't likely to scale well, since it + requires tracing all dependencies backward, it runs into problems on + NFS, and it's just generally flimsy. It would be better to use an MD5 + signature or the like, if available. See "cons" for an example. + + - append to perllocal.pod + - add a 'plugin' functionality + +AUTHOR + Ken Williams + + Development questions, bug reports, and patches should be sent to the + Module-Build mailing list at . + + Bug reports are also welcome at + . + + The latest development version is available from the Git repository at + + +COPYRIGHT + Copyright (c) 2001-2006 Ken Williams. All rights reserved. + + This library is free software; you can redistribute it and/or modify it + under the same terms as Perl itself. + +SEE ALSO + perl(1), Module::Build::Cookbook, Module::Build::Authoring, + Module::Build::API, ExtUtils::MakeMaker + + META.yml Specification: CPAN::Meta::Spec + + + + + diff --git a/bin/config_data b/bin/config_data new file mode 100644 index 0000000..fcd5c4d --- /dev/null +++ b/bin/config_data @@ -0,0 +1,249 @@ +#!/usr/bin/perl + +use strict; +use Module::Build 0.25; +use Getopt::Long; + +my %opt_defs = ( + module => {type => '=s', + desc => 'The name of the module to configure (required)'}, + feature => {type => ':s', + desc => 'Print the value of a feature or all features'}, + config => {type => ':s', + desc => 'Print the value of a config option'}, + set_feature => {type => '=s%', + desc => "Set a feature to 'true' or 'false'"}, + set_config => {type => '=s%', + desc => 'Set a config option to the given value'}, + eval => {type => '', + desc => 'eval() config values before setting'}, + help => {type => '', + desc => 'Print a help message and exit'}, + ); + +my %opts; +GetOptions( \%opts, map "$_$opt_defs{$_}{type}", keys %opt_defs ) or die usage(%opt_defs); +print usage(%opt_defs) and exit(0) + if $opts{help}; + +my @exclusive = qw(feature config set_feature set_config); +die "Exactly one of the options '" . join("', '", @exclusive) . "' must be specified\n" . usage(%opt_defs) + unless grep(exists $opts{$_}, @exclusive) == 1; + +die "Option --module is required\n" . usage(%opt_defs) + unless $opts{module}; + +my $cf = load_config($opts{module}); + +if (exists $opts{feature}) { + + if (length $opts{feature}) { + print $cf->feature($opts{feature}); + } else { + my %auto; + # note: need to support older ConfigData.pm's + @auto{$cf->auto_feature_names} = () if $cf->can("auto_feature_names"); + + print " Features defined in $cf:\n"; + foreach my $name (sort $cf->feature_names) { + print " $name => ", $cf->feature($name), (exists $auto{$name} ? " (dynamic)" : ""), "\n"; + } + } + +} elsif (exists $opts{config}) { + + require Data::Dumper; + local $Data::Dumper::Terse = 1; + + if (length $opts{config}) { + print Data::Dumper::Dumper($cf->config($opts{config})), "\n"; + } else { + print " Configuration defined in $cf:\n"; + foreach my $name (sort $cf->config_names) { + print " $name => ", Data::Dumper::Dumper($cf->config($name)), "\n"; + } + } + +} elsif (exists $opts{set_feature}) { + my %to_set = %{$opts{set_feature}}; + while (my ($k, $v) = each %to_set) { + die "Feature value must be 0 or 1\n" unless $v =~ /^[01]$/; + $cf->set_feature($k, 0+$v); # Cast to a number, not a string + } + $cf->write; + print "Feature" . 's'x(keys(%to_set)>1) . " saved\n"; + +} elsif (exists $opts{set_config}) { + + my %to_set = %{$opts{set_config}}; + while (my ($k, $v) = each %to_set) { + if ($opts{eval}) { + $v = eval($v); + die $@ if $@; + } + $cf->set_config($k, $v); + } + $cf->write; + print "Config value" . 's'x(keys(%to_set)>1) . " saved\n"; +} + +sub load_config { + my $mod = shift; + + $mod =~ /^([\w:]+)$/ + or die "Invalid module name '$mod'"; + + my $cf = $mod . "::ConfigData"; + eval "require $cf"; + die $@ if $@; + + return $cf; +} + +sub usage { + my %defs = @_; + + my $out = "\nUsage: $0 [options]\n\n Options include:\n"; + + foreach my $name (sort keys %defs) { + $out .= " --$name"; + + for ($defs{$name}{type}) { + /^=s$/ and $out .= " "; + /^=s%$/ and $out .= " ="; + } + + pad_line($out, 35); + $out .= "$defs{$name}{desc}\n"; + } + + $out .= < tool provides a command-line interface to the +configuration of Perl modules. By "configuration", we mean something +akin to "user preferences" or "local settings". This is a +formalization and abstraction of the systems that people like Andreas +Koenig (C), Jon Swartz (C), Andy +Wardley (C), and Larry Wall (perl's own Config.pm) +have developed independently. + +The configuration system employed here was developed in the context of +C. Under this system, configuration information for a +module C, for example, is stored in a module called +C) (I would have called it C, but that +was taken by all those other systems mentioned in the previous +paragraph...). These C<...::ConfigData> modules contain the +configuration data, as well as publicly accessible methods for +querying and setting (yes, actually re-writing) the configuration +data. The C script (whose docs you are currently +reading) is merely a front-end for those methods. If you wish, you +may create alternate front-ends. + +The two types of data that may be stored are called C values +and C values. A C value may be any perl scalar, +including references to complex data structures. It must, however, be +serializable using C. A C is a boolean (1 or +0) value. + +=head1 USAGE + +This script functions as a basic getter/setter wrapper around the +configuration of a single module. On the command line, specify which +module's configuration you're interested in, and pass options to get +or set C or C values. The following options are +supported: + +=over 4 + +=item module + +Specifies the name of the module to configure (required). + +=item feature + +When passed the name of a C, shows its value. The value will +be 1 if the feature is enabled, 0 if the feature is not enabled, or +empty if the feature is unknown. When no feature name is supplied, +the names and values of all known features will be shown. + +=item config + +When passed the name of a C entry, shows its value. The value +will be displayed using C (or similar) as perl code. +When no config name is supplied, the names and values of all known +config entries will be shown. + +=item set_feature + +Sets the given C to the given boolean value. Specify the value +as either 1 or 0. + +=item set_config + +Sets the given C entry to the given value. + +=item eval + +If the C<--eval> option is used, the values in C will be +evaluated as perl code before being stored. This allows moderately +complicated data structures to be stored. For really complicated +structures, you probably shouldn't use this command-line interface, +just use the Perl API instead. + +=item help + +Prints a help message, including a few examples, and exits. + +=back + +=head1 AUTHOR + +Ken Williams, kwilliams@cpan.org + +=head1 COPYRIGHT + +Copyright (c) 1999, Ken Williams. All rights reserved. + +This library is free software; you can redistribute it and/or modify +it under the same terms as Perl itself. + +=head1 SEE ALSO + +Module::Build(3), perl(1). + +=cut diff --git a/contrib/bash_completion.module-build b/contrib/bash_completion.module-build new file mode 100644 index 0000000..ac95177 --- /dev/null +++ b/contrib/bash_completion.module-build @@ -0,0 +1,39 @@ +# Module::Build Bash completion function +# Contributed by Julian Mehnle +# $Id$ +# vim:syn=sh + +if + actions=$( + perl -M'Module::Build' -le 'print foreach Module::Build->known_actions' 2>/dev/null + ) && + properties=$( + perl -M'Module::Build' -le 'print foreach sort Module::Build->valid_properties' 2>/dev/null + ) +then + eval "_Build_actions () { echo '$actions'; }" + eval "_Build_properties () { echo '$properties'; }" + unset -v actions properties + + _Build () { + local word=${COMP_WORDS[COMP_CWORD]} + #local prev_word=${COMP_WORDS[COMP_CWORD-1]} + #local action=${COMP_WORDS[1]} + + if (( $COMP_CWORD == 1 )); then + # Complete actions: + local IFS_org="$IFS" + IFS=$'\x1F\t\n' + # Avoid space (\x20) as a word separator to make the following -S ' ' work. + COMPREPLY=($( compgen -W "$(_Build_actions)" -S ' ' -- "$word" )) + IFS="$IFS_org" + else + # Complete properties: + COMPREPLY=($( compgen -W "$(_Build_properties)" -S = -- "$word" )) + fi + + return 0 + } + + complete -o nospace -F _Build Build +fi diff --git a/inc/MBVersion.pm b/inc/MBVersion.pm new file mode 100644 index 0000000..558a9ff --- /dev/null +++ b/inc/MBVersion.pm @@ -0,0 +1,1187 @@ +# Bootstrap pure-perl version +package MB::Version; +use strict; + +use vars qw($VERSION); +$VERSION = 0.86; + +eval "use version $VERSION"; +if ($@) { # can't locate new enough version files, use our own + # We might be here because version.pm was present but there was + # an error, so make we want to be sure users see what's happening + # We also need to clear %INC entries, as the "undef" for a broken + # version.pm can't be directly overwritten later. + if ( exists $INC{'version.pm'} && ! defined $INC{'version.pm'} ) { + warn "Error loading version.pm: $@\n"; + warn "Using Module::Build::Version bundled version code instead.\n"; + delete $INC{'version.pm'}; + delete $INC{'version/vpp.pm'}; + } + + # Avoid redefined warnings if an old version.pm was available + delete $version::{$_} foreach keys %version::; + + # first we get the stub version module + my $version; + while () { + s/(\$VERSION)\s=\s\d+/\$VERSION = 0/; + $version .= $_ if $_; + last if /^1;$/; + } + + # and now get the current version::vpp code + my $vpp; + while () { + s/(\$VERSION)\s=\s\d+/\$VERSION = 0/; + $vpp .= $_ if $_; + last if /^1;$/; + } + + # but we eval them in reverse order since version depends on + # version::vpp to already exist + eval $vpp; die $@ if $@; + $INC{'version/vpp.pm'} = 'inside Module::Build::Version'; + eval $version; die $@ if $@; + $INC{'version.pm'} = 'inside Module::Build::Version'; +} + +1; +__DATA__ +# XXX replace everything from here to the next XXX with the +# contents of version.pm from CPAN and then edit to ensure +# the XS clause is not invoked and comment out the line about +# C<< eval "use version::vpp $VERSION"; >> since we provide +# our own copy + +package version; + +use 5.005_04; +use strict; + +use vars qw(@ISA $VERSION $CLASS $STRICT $LAX *declare *qv); + +$VERSION = 0.87; + +$CLASS = 'version'; + +#--------------------------------------------------------------------------# +# Version regexp components +#--------------------------------------------------------------------------# + +# Fraction part of a decimal version number. This is a common part of +# both strict and lax decimal versions + +my $FRACTION_PART = qr/\.[0-9]+/; + +# First part of either decimal or dotted-decimal strict version number. +# Unsigned integer with no leading zeroes (except for zero itself) to +# avoid confusion with octal. + +my $STRICT_INTEGER_PART = qr/0|[1-9][0-9]*/; + +# First part of either decimal or dotted-decimal lax version number. +# Unsigned integer, but allowing leading zeros. Always interpreted +# as decimal. However, some forms of the resulting syntax give odd +# results if used as ordinary Perl expressions, due to how perl treats +# octals. E.g. +# version->new("010" ) == 10 +# version->new( 010 ) == 8 +# version->new( 010.2) == 82 # "8" . "2" + +my $LAX_INTEGER_PART = qr/[0-9]+/; + +# Second and subsequent part of a strict dotted-decimal version number. +# Leading zeroes are permitted, and the number is always decimal. +# Limited to three digits to avoid overflow when converting to decimal +# form and also avoid problematic style with excessive leading zeroes. + +my $STRICT_DOTTED_DECIMAL_PART = qr/\.[0-9]{1,3}/; + +# Second and subsequent part of a lax dotted-decimal version number. +# Leading zeroes are permitted, and the number is always decimal. No +# limit on the numerical value or number of digits, so there is the +# possibility of overflow when converting to decimal form. + +my $LAX_DOTTED_DECIMAL_PART = qr/\.[0-9]+/; + +# Alpha suffix part of lax version number syntax. Acts like a +# dotted-decimal part. + +my $LAX_ALPHA_PART = qr/_[0-9]+/; + +#--------------------------------------------------------------------------# +# Strict version regexp definitions +#--------------------------------------------------------------------------# + +# Strict decimal version number. + +my $STRICT_DECIMAL_VERSION = + qr/ $STRICT_INTEGER_PART $FRACTION_PART? /x; + +# Strict dotted-decimal version number. Must have both leading "v" and +# at least three parts, to avoid confusion with decimal syntax. + +my $STRICT_DOTTED_DECIMAL_VERSION = + qr/ v $STRICT_INTEGER_PART $STRICT_DOTTED_DECIMAL_PART{2,} /x; + +# Complete strict version number syntax -- should generally be used +# anchored: qr/ \A $STRICT \z /x + +$STRICT = + qr/ $STRICT_DECIMAL_VERSION | $STRICT_DOTTED_DECIMAL_VERSION /x; + +#--------------------------------------------------------------------------# +# Lax version regexp definitions +#--------------------------------------------------------------------------# + +# Lax decimal version number. Just like the strict one except for +# allowing an alpha suffix or allowing a leading or trailing +# decimal-point + +my $LAX_DECIMAL_VERSION = + qr/ $LAX_INTEGER_PART (?: \. | $FRACTION_PART $LAX_ALPHA_PART? )? + | + $FRACTION_PART $LAX_ALPHA_PART? + /x; + +# Lax dotted-decimal version number. Distinguished by having either +# leading "v" or at least three non-alpha parts. Alpha part is only +# permitted if there are at least two non-alpha parts. Strangely +# enough, without the leading "v", Perl takes .1.2 to mean v0.1.2, +# so when there is no "v", the leading part is optional + +my $LAX_DOTTED_DECIMAL_VERSION = + qr/ + v $LAX_INTEGER_PART (?: $LAX_DOTTED_DECIMAL_PART+ $LAX_ALPHA_PART? )? + | + $LAX_INTEGER_PART? $LAX_DOTTED_DECIMAL_PART{2,} $LAX_ALPHA_PART? + /x; + +# Complete lax version number syntax -- should generally be used +# anchored: qr/ \A $LAX \z /x +# +# The string 'undef' is a special case to make for easier handling +# of return values from ExtUtils::MM->parse_version + +$LAX = + qr/ undef | $LAX_DECIMAL_VERSION | $LAX_DOTTED_DECIMAL_VERSION /x; + +#--------------------------------------------------------------------------# + +#eval "use version::vxs $VERSION"; XXX DONT TRY XS +if ( 1 ) { # XXX FORCE PURE PERL +# eval "use version::vpp $VERSION"; # don't tempt fate +# die "$@" if ( $@ ); + push @ISA, "version::vpp"; + local $^W; + *version::qv = \&version::vpp::qv; + *version::declare = \&version::vpp::declare; + *version::_VERSION = \&version::vpp::_VERSION; + if ($] >= 5.009000 && $] < 5.011004) { + no strict 'refs'; + *version::stringify = \&version::vpp::stringify; + *{'version::(""'} = \&version::vpp::stringify; + *version::new = \&version::vpp::new; + *version::parse = \&version::vpp::parse; + } +} +else { # use XS module +# XXX NO XS FOR US -- WE DELETED IT +} + +# Preloaded methods go here. +sub import { + no strict 'refs'; + my ($class) = shift; + + # Set up any derived class + unless ($class eq 'version') { + local $^W; + *{$class.'::declare'} = \&version::declare; + *{$class.'::qv'} = \&version::qv; + } + + my %args; + if (@_) { # any remaining terms are arguments + map { $args{$_} = 1 } @_ + } + else { # no parameters at all on use line + %args = + ( + qv => 1, + 'UNIVERSAL::VERSION' => 1, + ); + } + + my $callpkg = caller(); + + if (exists($args{declare})) { + *{$callpkg.'::declare'} = + sub {return $class->declare(shift) } + unless defined(&{$callpkg.'::declare'}); + } + + if (exists($args{qv})) { + *{$callpkg.'::qv'} = + sub {return $class->qv(shift) } + unless defined(&{$callpkg.'::qv'}); + } + + if (exists($args{'UNIVERSAL::VERSION'})) { + local $^W; + *UNIVERSAL::VERSION + = \&version::_VERSION; + } + + if (exists($args{'VERSION'})) { + *{$callpkg.'::VERSION'} = \&version::_VERSION; + } + + if (exists($args{'is_strict'})) { + *{$callpkg.'::is_strict'} = \&version::is_strict + unless defined(&{$callpkg.'::is_strict'}); + } + + if (exists($args{'is_lax'})) { + *{$callpkg.'::is_lax'} = \&version::is_lax + unless defined(&{$callpkg.'::is_lax'}); + } +} + +sub is_strict { defined $_[0] && $_[0] =~ qr/ \A $STRICT \z /x } +sub is_lax { defined $_[0] && $_[0] =~ qr/ \A $LAX \z /x } + +1; + +# XXX replace everything from here to the end with the current version/vpp.pm + +package charstar; +# a little helper class to emulate C char* semantics in Perl +# so that prescan_version can use the same code as in C + +use overload ( + '""' => \&thischar, + '0+' => \&thischar, + '++' => \&increment, + '--' => \&decrement, + '+' => \&plus, + '-' => \&minus, + '*' => \&multiply, + 'cmp' => \&cmp, + '<=>' => \&spaceship, + 'bool' => \&thischar, + '=' => \&clone, +); + +sub new { + my ($self, $string) = @_; + my $class = ref($self) || $self; + + my $obj = { + string => [split(//,$string)], + current => 0, + }; + return bless $obj, $class; +} + +sub thischar { + my ($self) = @_; + my $last = $#{$self->{string}}; + my $curr = $self->{current}; + if ($curr >= 0 && $curr <= $last) { + return $self->{string}->[$curr]; + } + else { + return ''; + } +} + +sub increment { + my ($self) = @_; + $self->{current}++; +} + +sub decrement { + my ($self) = @_; + $self->{current}--; +} + +sub plus { + my ($self, $offset) = @_; + my $rself = $self->clone; + $rself->{current} += $offset; + return $rself; +} + +sub minus { + my ($self, $offset) = @_; + my $rself = $self->clone; + $rself->{current} -= $offset; + return $rself; +} + +sub multiply { + my ($left, $right, $swapped) = @_; + my $char = $left->thischar(); + return $char * $right; +} + +sub spaceship { + my ($left, $right, $swapped) = @_; + unless (ref($right)) { # not an object already + $right = $left->new($right); + } + return $left->{current} <=> $right->{current}; +} + +sub cmp { + my ($left, $right, $swapped) = @_; + unless (ref($right)) { # not an object already + if (length($right) == 1) { # comparing single character only + return $left->thischar cmp $right; + } + $right = $left->new($right); + } + return $left->currstr cmp $right->currstr; +} + +sub bool { + my ($self) = @_; + my $char = $self->thischar; + return ($char ne ''); +} + +sub clone { + my ($left, $right, $swapped) = @_; + $right = { + string => [@{$left->{string}}], + current => $left->{current}, + }; + return bless $right, ref($left); +} + +sub currstr { + my ($self, $s) = @_; + my $curr = $self->{current}; + my $last = $#{$self->{string}}; + if (defined($s) && $s->{current} < $last) { + $last = $s->{current}; + } + + my $string = join('', @{$self->{string}}[$curr..$last]); + return $string; +} + +package version::vpp; +use strict; + +use POSIX qw/locale_h/; +use locale; +use vars qw ($VERSION @ISA @REGEXS); +$VERSION = 0.87; + +use overload ( + '""' => \&stringify, + '0+' => \&numify, + 'cmp' => \&vcmp, + '<=>' => \&vcmp, + 'bool' => \&vbool, + 'nomethod' => \&vnoop, +); + +eval "use warnings"; +if ($@) { + eval ' + package warnings; + sub enabled {return $^W;} + 1; + '; +} + +my $VERSION_MAX = 0x7FFFFFFF; + +# implement prescan_version as closely to the C version as possible +use constant TRUE => 1; +use constant FALSE => 0; + +sub isDIGIT { + my ($char) = shift->thischar(); + return ($char =~ /\d/); +} + +sub isALPHA { + my ($char) = shift->thischar(); + return ($char =~ /[a-zA-Z]/); +} + +sub isSPACE { + my ($char) = shift->thischar(); + return ($char =~ /\s/); +} + +sub BADVERSION { + my ($s, $errstr, $error) = @_; + if ($errstr) { + $$errstr = $error; + } + return $s; +} + +sub prescan_version { + my ($s, $strict, $errstr, $sqv, $ssaw_decimal, $swidth, $salpha) = @_; + my $qv = defined $sqv ? $$sqv : FALSE; + my $saw_decimal = defined $ssaw_decimal ? $$ssaw_decimal : 0; + my $width = defined $swidth ? $$swidth : 3; + my $alpha = defined $salpha ? $$salpha : FALSE; + + my $d = $s; + + if ($qv && isDIGIT($d)) { + goto dotted_decimal_version; + } + + if ($d eq 'v') { # explicit v-string + $d++; + if (isDIGIT($d)) { + $qv = TRUE; + } + else { # degenerate v-string + # requires v1.2.3 + return BADVERSION($s,$errstr,"Invalid version format (dotted-decimal versions require at least three parts)"); + } + +dotted_decimal_version: + if ($strict && $d eq '0' && isDIGIT($d+1)) { + # no leading zeros allowed + return BADVERSION($s,$errstr,"Invalid version format (no leading zeros)"); + } + + while (isDIGIT($d)) { # integer part + $d++; + } + + if ($d eq '.') + { + $saw_decimal++; + $d++; # decimal point + } + else + { + if ($strict) { + # require v1.2.3 + return BADVERSION($s,$errstr,"Invalid version format (dotted-decimal versions require at least three parts)"); + } + else { + goto version_prescan_finish; + } + } + + { + my $i = 0; + my $j = 0; + while (isDIGIT($d)) { # just keep reading + $i++; + while (isDIGIT($d)) { + $d++; $j++; + # maximum 3 digits between decimal + if ($strict && $j > 3) { + return BADVERSION($s,$errstr,"Invalid version format (maximum 3 digits between decimals)"); + } + } + if ($d eq '_') { + if ($strict) { + return BADVERSION($s,$errstr,"Invalid version format (no underscores)"); + } + if ( $alpha ) { + return BADVERSION($s,$errstr,"Invalid version format (multiple underscores)"); + } + $d++; + $alpha = TRUE; + } + elsif ($d eq '.') { + if ($alpha) { + return BADVERSION($s,$errstr,"Invalid version format (underscores before decimal)"); + } + $saw_decimal++; + $d++; + } + elsif (!isDIGIT($d)) { + last; + } + $j = 0; + } + + if ($strict && $i < 2) { + # requires v1.2.3 + return BADVERSION($s,$errstr,"Invalid version format (dotted-decimal versions require at least three parts)"); + } + } + } # end if dotted-decimal + else + { # decimal versions + # special $strict case for leading '.' or '0' + if ($strict) { + if ($d eq '.') { + return BADVERSION($s,$errstr,"Invalid version format (0 before decimal required)"); + } + if ($d eq '0' && isDIGIT($d+1)) { + return BADVERSION($s,$errstr,"Invalid version format (no leading zeros)"); + } + } + + # consume all of the integer part + while (isDIGIT($d)) { + $d++; + } + + # look for a fractional part + if ($d eq '.') { + # we found it, so consume it + $saw_decimal++; + $d++; + } + elsif (!$d || $d eq ';' || isSPACE($d) || $d eq '}') { + if ( $d == $s ) { + # found nothing + return BADVERSION($s,$errstr,"Invalid version format (version required)"); + } + # found just an integer + goto version_prescan_finish; + } + elsif ( $d == $s ) { + # didn't find either integer or period + return BADVERSION($s,$errstr,"Invalid version format (non-numeric data)"); + } + elsif ($d eq '_') { + # underscore can't come after integer part + if ($strict) { + return BADVERSION($s,$errstr,"Invalid version format (no underscores)"); + } + elsif (isDIGIT($d+1)) { + return BADVERSION($s,$errstr,"Invalid version format (alpha without decimal)"); + } + else { + return BADVERSION($s,$errstr,"Invalid version format (misplaced underscore)"); + } + } + elsif ($d) { + # anything else after integer part is just invalid data + return BADVERSION($s,$errstr,"Invalid version format (non-numeric data)"); + } + + # scan the fractional part after the decimal point + if ($d && !isDIGIT($d) && ($strict || ! ($d eq ';' || isSPACE($d) || $d eq '}') )) { + # $strict or lax-but-not-the-end + return BADVERSION($s,$errstr,"Invalid version format (fractional part required)"); + } + + while (isDIGIT($d)) { + $d++; + if ($d eq '.' && isDIGIT($d-1)) { + if ($alpha) { + return BADVERSION($s,$errstr,"Invalid version format (underscores before decimal)"); + } + if ($strict) { + return BADVERSION($s,$errstr,"Invalid version format (dotted-decimal versions must begin with 'v')"); + } + $d = $s; # start all over again + $qv = TRUE; + goto dotted_decimal_version; + } + if ($d eq '_') { + if ($strict) { + return BADVERSION($s,$errstr,"Invalid version format (no underscores)"); + } + if ( $alpha ) { + return BADVERSION($s,$errstr,"Invalid version format (multiple underscores)"); + } + if ( ! isDIGIT($d+1) ) { + return BADVERSION($s,$errstr,"Invalid version format (misplaced underscore)"); + } + $d++; + $alpha = TRUE; + } + } + } + +version_prescan_finish: + while (isSPACE($d)) { + $d++; + } + + if ($d && !isDIGIT($d) && (! ($d eq ';' || $d eq '}') )) { + # trailing non-numeric data + return BADVERSION($s,$errstr,"Invalid version format (non-numeric data)"); + } + + if (defined $sqv) { + $$sqv = $qv; + } + if (defined $swidth) { + $$swidth = $width; + } + if (defined $ssaw_decimal) { + $$ssaw_decimal = $saw_decimal; + } + if (defined $salpha) { + $$salpha = $alpha; + } + return $d; +} + +sub scan_version { + my ($s, $rv, $qv) = @_; + my $start; + my $pos; + my $last; + my $errstr; + my $saw_decimal = 0; + my $width = 3; + my $alpha = FALSE; + my $vinf = FALSE; + my @av; + + $s = new charstar $s; + + while (isSPACE($s)) { # leading whitespace is OK + $s++; + } + + $last = prescan_version($s, FALSE, \$errstr, \$qv, \$saw_decimal, + \$width, \$alpha); + + if ($errstr) { + # 'undef' is a special case and not an error + if ( $s ne 'undef') { + use Carp; + Carp::croak($errstr); + } + } + + $start = $s; + if ($s eq 'v') { + $s++; + } + $pos = $s; + + if ( $qv ) { + $$rv->{qv} = $qv; + } + if ( $alpha ) { + $$rv->{alpha} = $alpha; + } + if ( !$qv && $width < 3 ) { + $$rv->{width} = $width; + } + + while (isDIGIT($pos)) { + $pos++; + } + if (!isALPHA($pos)) { + my $rev; + + for (;;) { + $rev = 0; + { + # this is atoi() that delimits on underscores + my $end = $pos; + my $mult = 1; + my $orev; + + # the following if() will only be true after the decimal + # point of a version originally created with a bare + # floating point number, i.e. not quoted in any way + # + if ( !$qv && $s > $start && $saw_decimal == 1 ) { + $mult *= 100; + while ( $s < $end ) { + $orev = $rev; + $rev += $s * $mult; + $mult /= 10; + if ( (abs($orev) > abs($rev)) + || (abs($rev) > $VERSION_MAX )) { + warn("Integer overflow in version %d", + $VERSION_MAX); + $s = $end - 1; + $rev = $VERSION_MAX; + $vinf = 1; + } + $s++; + if ( $s eq '_' ) { + $s++; + } + } + } + else { + while (--$end >= $s) { + $orev = $rev; + $rev += $end * $mult; + $mult *= 10; + if ( (abs($orev) > abs($rev)) + || (abs($rev) > $VERSION_MAX )) { + warn("Integer overflow in version"); + $end = $s - 1; + $rev = $VERSION_MAX; + $vinf = 1; + } + } + } + } + + # Append revision + push @av, $rev; + if ( $vinf ) { + $s = $last; + last; + } + elsif ( $pos eq '.' ) { + $s = ++$pos; + } + elsif ( $pos eq '_' && isDIGIT($pos+1) ) { + $s = ++$pos; + } + elsif ( $pos eq ',' && isDIGIT($pos+1) ) { + $s = ++$pos; + } + elsif ( isDIGIT($pos) ) { + $s = $pos; + } + else { + $s = $pos; + last; + } + if ( $qv ) { + while ( isDIGIT($pos) ) { + $pos++; + } + } + else { + my $digits = 0; + while ( ( isDIGIT($pos) || $pos eq '_' ) && $digits < 3 ) { + if ( $pos ne '_' ) { + $digits++; + } + $pos++; + } + } + } + } + if ( $qv ) { # quoted versions always get at least three terms + my $len = $#av; + # This for loop appears to trigger a compiler bug on OS X, as it + # loops infinitely. Yes, len is negative. No, it makes no sense. + # Compiler in question is: + # gcc version 3.3 20030304 (Apple Computer, Inc. build 1640) + # for ( len = 2 - len; len > 0; len-- ) + # av_push(MUTABLE_AV(sv), newSViv(0)); + # + $len = 2 - $len; + while ($len-- > 0) { + push @av, 0; + } + } + + # need to save off the current version string for later + if ( $vinf ) { + $$rv->{original} = "v.Inf"; + $$rv->{vinf} = 1; + } + elsif ( $s > $start ) { + $$rv->{original} = $start->currstr($s); + if ( $qv && $saw_decimal == 1 && $start ne 'v' ) { + # need to insert a v to be consistent + $$rv->{original} = 'v' . $$rv->{original}; + } + } + else { + $$rv->{original} = '0'; + push(@av, 0); + } + + # And finally, store the AV in the hash + $$rv->{version} = \@av; + + # fix RT#19517 - special case 'undef' as string + if ($s eq 'undef') { + $s += 5; + } + + return $s; +} + +sub new +{ + my ($class, $value) = @_; + my $self = bless ({}, ref ($class) || $class); + my $qv = FALSE; + + if ( ref($value) && eval('$value->isa("version")') ) { + # Can copy the elements directly + $self->{version} = [ @{$value->{version} } ]; + $self->{qv} = 1 if $value->{qv}; + $self->{alpha} = 1 if $value->{alpha}; + $self->{original} = ''.$value->{original}; + return $self; + } + + my $currlocale = setlocale(LC_ALL); + + # if the current locale uses commas for decimal points, we + # just replace commas with decimal places, rather than changing + # locales + if ( localeconv()->{decimal_point} eq ',' ) { + $value =~ tr/,/./; + } + + if ( not defined $value or $value =~ /^undef$/ ) { + # RT #19517 - special case for undef comparison + # or someone forgot to pass a value + push @{$self->{version}}, 0; + $self->{original} = "0"; + return ($self); + } + + if ( $#_ == 2 ) { # must be CVS-style + $value = $_[2]; + $qv = TRUE; + } + + $value = _un_vstring($value); + + # exponential notation + if ( $value =~ /\d+.?\d*e[-+]?\d+/ ) { + $value = sprintf("%.9f",$value); + $value =~ s/(0+)$//; # trim trailing zeros + } + + my $s = scan_version($value, \$self, $qv); + + if ($s) { # must be something left over + warn("Version string '%s' contains invalid data; " + ."ignoring: '%s'", $value, $s); + } + + return ($self); +} + +*parse = \&new; + +sub numify +{ + my ($self) = @_; + unless (_verify($self)) { + require Carp; + Carp::croak("Invalid version object"); + } + my $width = $self->{width} || 3; + my $alpha = $self->{alpha} || ""; + my $len = $#{$self->{version}}; + my $digit = $self->{version}[0]; + my $string = sprintf("%d.", $digit ); + + for ( my $i = 1 ; $i < $len ; $i++ ) { + $digit = $self->{version}[$i]; + if ( $width < 3 ) { + my $denom = 10**(3-$width); + my $quot = int($digit/$denom); + my $rem = $digit - ($quot * $denom); + $string .= sprintf("%0".$width."d_%d", $quot, $rem); + } + else { + $string .= sprintf("%03d", $digit); + } + } + + if ( $len > 0 ) { + $digit = $self->{version}[$len]; + if ( $alpha && $width == 3 ) { + $string .= "_"; + } + $string .= sprintf("%0".$width."d", $digit); + } + else # $len = 0 + { + $string .= sprintf("000"); + } + + return $string; +} + +sub normal +{ + my ($self) = @_; + unless (_verify($self)) { + require Carp; + Carp::croak("Invalid version object"); + } + my $alpha = $self->{alpha} || ""; + my $len = $#{$self->{version}}; + my $digit = $self->{version}[0]; + my $string = sprintf("v%d", $digit ); + + for ( my $i = 1 ; $i < $len ; $i++ ) { + $digit = $self->{version}[$i]; + $string .= sprintf(".%d", $digit); + } + + if ( $len > 0 ) { + $digit = $self->{version}[$len]; + if ( $alpha ) { + $string .= sprintf("_%0d", $digit); + } + else { + $string .= sprintf(".%0d", $digit); + } + } + + if ( $len <= 2 ) { + for ( $len = 2 - $len; $len != 0; $len-- ) { + $string .= sprintf(".%0d", 0); + } + } + + return $string; +} + +sub stringify +{ + my ($self) = @_; + unless (_verify($self)) { + require Carp; + Carp::croak("Invalid version object"); + } + return exists $self->{original} + ? $self->{original} + : exists $self->{qv} + ? $self->normal + : $self->numify; +} + +sub vcmp +{ + my ($left,$right,$swap) = @_; + my $class = ref($left); + unless ( eval { $right->isa($class) } ) { + $right = $class->new($right); + } + + if ( $swap ) { + ($left, $right) = ($right, $left); + } + unless (_verify($left)) { + require Carp; + Carp::croak("Invalid version object"); + } + unless (_verify($right)) { + require Carp; + Carp::croak("Invalid version object"); + } + my $l = $#{$left->{version}}; + my $r = $#{$right->{version}}; + my $m = $l < $r ? $l : $r; + my $lalpha = $left->is_alpha; + my $ralpha = $right->is_alpha; + my $retval = 0; + my $i = 0; + while ( $i <= $m && $retval == 0 ) { + $retval = $left->{version}[$i] <=> $right->{version}[$i]; + $i++; + } + + # tiebreaker for alpha with identical terms + if ( $retval == 0 + && $l == $r + && $left->{version}[$m] == $right->{version}[$m] + && ( $lalpha || $ralpha ) ) { + + if ( $lalpha && !$ralpha ) { + $retval = -1; + } + elsif ( $ralpha && !$lalpha) { + $retval = +1; + } + } + + # possible match except for trailing 0's + if ( $retval == 0 && $l != $r ) { + if ( $l < $r ) { + while ( $i <= $r && $retval == 0 ) { + if ( $right->{version}[$i] != 0 ) { + $retval = -1; # not a match after all + } + $i++; + } + } + else { + while ( $i <= $l && $retval == 0 ) { + if ( $left->{version}[$i] != 0 ) { + $retval = +1; # not a match after all + } + $i++; + } + } + } + + return $retval; +} + +sub vbool { + my ($self) = @_; + return vcmp($self,$self->new("0"),1); +} + +sub vnoop { + require Carp; + Carp::croak("operation not supported with version object"); +} + +sub is_alpha { + my ($self) = @_; + return (exists $self->{alpha}); +} + +sub qv { + my $value = shift; + my $class = 'version'; + if (@_) { + $class = ref($value) || $value; + $value = shift; + } + + $value = _un_vstring($value); + $value = 'v'.$value unless $value =~ /(^v|\d+\.\d+\.\d)/; + my $version = $class->new($value); + return $version; +} + +*declare = \&qv; + +sub is_qv { + my ($self) = @_; + return (exists $self->{qv}); +} + + +sub _verify { + my ($self) = @_; + if ( ref($self) + && eval { exists $self->{version} } + && ref($self->{version}) eq 'ARRAY' + ) { + return 1; + } + else { + return 0; + } +} + +sub _is_non_alphanumeric { + my $s = shift; + $s = new charstar $s; + while ($s) { + return 0 if isSPACE($s); # early out + return 1 unless (isALPHA($s) || isDIGIT($s) || $s =~ /[.-]/); + $s++; + } + return 0; +} + +sub _un_vstring { + my $value = shift; + # may be a v-string + if ( length($value) >= 3 && $value !~ /[._]/ + && _is_non_alphanumeric($value)) { + my $tvalue; + if ( $] ge 5.008_001 ) { + $tvalue = _find_magic_vstring($value); + $value = $tvalue if length $tvalue; + } + elsif ( $] ge 5.006_000 ) { + $tvalue = sprintf("v%vd",$value); + if ( $tvalue =~ /^v\d+(\.\d+){2,}$/ ) { + # must be a v-string + $value = $tvalue; + } + } + } + return $value; +} + +sub _find_magic_vstring { + my $value = shift; + my $tvalue = ''; + require B; + my $sv = B::svref_2object(\$value); + my $magic = ref($sv) eq 'B::PVMG' ? $sv->MAGIC : undef; + while ( $magic ) { + if ( $magic->TYPE eq 'V' ) { + $tvalue = $magic->PTR; + $tvalue =~ s/^v?(.+)$/v$1/; + last; + } + else { + $magic = $magic->MOREMAGIC; + } + } + return $tvalue; +} + +sub _VERSION { + my ($obj, $req) = @_; + my $class = ref($obj) || $obj; + + no strict 'refs'; + if ( exists $INC{"$class.pm"} and not %{"$class\::"} and $] >= 5.008) { + # file but no package + require Carp; + Carp::croak( "$class defines neither package nor VERSION" + ."--version check failed"); + } + + my $version = eval "\$$class\::VERSION"; + if ( defined $version ) { + local $^W if $] <= 5.008; + $version = version::vpp->new($version); + } + + if ( defined $req ) { + unless ( defined $version ) { + require Carp; + my $msg = $] < 5.006 + ? "$class version $req required--this is only version " + : "$class does not define \$$class\::VERSION" + ."--version check failed"; + + if ( $ENV{VERSION_DEBUG} ) { + Carp::confess($msg); + } + else { + Carp::croak($msg); + } + } + + $req = version::vpp->new($req); + + if ( $req > $version ) { + require Carp; + if ( $req->is_qv ) { + Carp::croak( + sprintf ("%s version %s required--". + "this is only version %s", $class, + $req->normal, $version->normal) + ); + } + else { + Carp::croak( + sprintf ("%s version %s required--". + "this is only version %s", $class, + $req->stringify, $version->stringify) + ); + } + } + } + + return defined $version ? $version->stringify : undef; +} + +1; #this line is important and will help the module return a true value diff --git a/inc/Module/Metadata.pm b/inc/Module/Metadata.pm new file mode 100644 index 0000000..5d8b5c0 --- /dev/null +++ b/inc/Module/Metadata.pm @@ -0,0 +1,759 @@ +# -*- mode: cperl; tab-width: 8; indent-tabs-mode: nil; basic-offset: 2 -*- +# vim:ts=8:sw=2:et:sta:sts=2 +package Module::Metadata; + +# stolen from Module::Build::Version and ::Base - this is perl licensed code, +# copyright them. + +# This module provides routines to gather information about +# perl modules (assuming this may be expanded in the distant +# parrot future to look at other types of modules). + +use strict; +use vars qw($VERSION); +$VERSION = '1.000002'; +$VERSION = eval $VERSION; + +use File::Spec; +use version 0.87; +BEGIN { + if ($INC{'Log/Contextual.pm'}) { + Log::Contextual->import('log_info'); + } else { + *log_info = sub (&) { warn $_[0]->() }; + } +} +use File::Find qw(find); + +my $V_NUM_REGEXP = qr{v?[0-9._]+}; # crudely, a v-string or decimal + +my $PKG_REGEXP = qr{ # match a package declaration + ^[\s\{;]* # intro chars on a line + package # the word 'package' + \s+ # whitespace + ([\w:]+) # a package name + \s* # optional whitespace + ($V_NUM_REGEXP)? # optional version number + \s* # optional whitesapce + ; # semicolon line terminator +}x; + +my $VARNAME_REGEXP = qr{ # match fully-qualified VERSION name + ([\$*]) # sigil - $ or * + ( + ( # optional leading package name + (?:::|\')? # possibly starting like just :: (Ì la $::VERSION) + (?:\w+(?:::|\'))* # Foo::Bar:: ... + )? + VERSION + )\b +}x; + +my $VERS_REGEXP = qr{ # match a VERSION definition + (?: + \(\s*$VARNAME_REGEXP\s*\) # with parens + | + $VARNAME_REGEXP # without parens + ) + \s* + =[^=~] # = but not ==, nor =~ +}x; + + +sub new_from_file { + my $class = shift; + my $filename = File::Spec->rel2abs( shift ); + + return undef unless defined( $filename ) && -f $filename; + return $class->_init(undef, $filename, @_); +} + +sub new_from_module { + my $class = shift; + my $module = shift; + my %props = @_; + + $props{inc} ||= \@INC; + my $filename = $class->find_module_by_name( $module, $props{inc} ); + return undef unless defined( $filename ) && -f $filename; + return $class->_init($module, $filename, %props); +} + +{ + + my $compare_versions = sub { + my ($v1, $op, $v2) = @_; + $v1 = version->new($v1) + unless eval { $v1->isa('version') }; + + my $eval_str = "\$v1 $op \$v2"; + my $result = eval $eval_str; + log_info { "error comparing versions: '$eval_str' $@" } if $@; + + return $result; + }; + + my $normalize_version = sub { + my ($version) = @_; + if ( $version =~ /[=<>!,]/ ) { # logic, not just version + # take as is without modification + } + elsif ( ref $version eq 'version' ) { # version objects + $version = $version->is_qv ? $version->normal : $version->stringify; + } + elsif ( $version =~ /^[^v][^.]*\.[^.]+\./ ) { # no leading v, multiple dots + # normalize string tuples without "v": "1.2.3" -> "v1.2.3" + $version = "v$version"; + } + else { + # leave alone + } + return $version; + }; + + # separate out some of the conflict resolution logic + + my $resolve_module_versions = sub { + my $packages = shift; + + my( $file, $version ); + my $err = ''; + foreach my $p ( @$packages ) { + if ( defined( $p->{version} ) ) { + if ( defined( $version ) ) { + if ( $compare_versions->( $version, '!=', $p->{version} ) ) { + $err .= " $p->{file} ($p->{version})\n"; + } else { + # same version declared multiple times, ignore + } + } else { + $file = $p->{file}; + $version = $p->{version}; + } + } + $file ||= $p->{file} if defined( $p->{file} ); + } + + if ( $err ) { + $err = " $file ($version)\n" . $err; + } + + my %result = ( + file => $file, + version => $version, + err => $err + ); + + return \%result; + }; + + sub package_versions_from_directory { + my ( $class, $dir, $files ) = @_; + + my @files; + + if ( $files ) { + @files = @$files; + } else { + find( { + wanted => sub { + push @files, $_ if -f $_ && /\.pm$/; + }, + no_chdir => 1, + }, $dir ); + } + + # First, we enumerate all packages & versions, + # separating into primary & alternative candidates + my( %prime, %alt ); + foreach my $file (@files) { + my $mapped_filename = File::Spec->abs2rel( $file, $dir ); + my @path = split( /\//, $mapped_filename ); + (my $prime_package = join( '::', @path )) =~ s/\.pm$//; + + my $pm_info = $class->new_from_file( $file ); + + foreach my $package ( $pm_info->packages_inside ) { + next if $package eq 'main'; # main can appear numerous times, ignore + next if $package eq 'DB'; # special debugging package, ignore + next if grep /^_/, split( /::/, $package ); # private package, ignore + + my $version = $pm_info->version( $package ); + + if ( $package eq $prime_package ) { + if ( exists( $prime{$package} ) ) { + # M::B::ModuleInfo will handle this conflict + die "Unexpected conflict in '$package'; multiple versions found.\n"; + } else { + $prime{$package}{file} = $mapped_filename; + $prime{$package}{version} = $version if defined( $version ); + } + } else { + push( @{$alt{$package}}, { + file => $mapped_filename, + version => $version, + } ); + } + } + } + + # Then we iterate over all the packages found above, identifying conflicts + # and selecting the "best" candidate for recording the file & version + # for each package. + foreach my $package ( keys( %alt ) ) { + my $result = $resolve_module_versions->( $alt{$package} ); + + if ( exists( $prime{$package} ) ) { # primary package selected + + if ( $result->{err} ) { + # Use the selected primary package, but there are conflicting + # errors among multiple alternative packages that need to be + # reported + log_info { + "Found conflicting versions for package '$package'\n" . + " $prime{$package}{file} ($prime{$package}{version})\n" . + $result->{err} + }; + + } elsif ( defined( $result->{version} ) ) { + # There is a primary package selected, and exactly one + # alternative package + + if ( exists( $prime{$package}{version} ) && + defined( $prime{$package}{version} ) ) { + # Unless the version of the primary package agrees with the + # version of the alternative package, report a conflict + if ( $compare_versions->( + $prime{$package}{version}, '!=', $result->{version} + ) + ) { + + log_info { + "Found conflicting versions for package '$package'\n" . + " $prime{$package}{file} ($prime{$package}{version})\n" . + " $result->{file} ($result->{version})\n" + }; + } + + } else { + # The prime package selected has no version so, we choose to + # use any alternative package that does have a version + $prime{$package}{file} = $result->{file}; + $prime{$package}{version} = $result->{version}; + } + + } else { + # no alt package found with a version, but we have a prime + # package so we use it whether it has a version or not + } + + } else { # No primary package was selected, use the best alternative + + if ( $result->{err} ) { + log_info { + "Found conflicting versions for package '$package'\n" . + $result->{err} + }; + } + + # Despite possible conflicting versions, we choose to record + # something rather than nothing + $prime{$package}{file} = $result->{file}; + $prime{$package}{version} = $result->{version} + if defined( $result->{version} ); + } + } + + # Normalize versions. Can't use exists() here because of bug in YAML::Node. + # XXX "bug in YAML::Node" comment seems irrelvant -- dagolden, 2009-05-18 + for (grep defined $_->{version}, values %prime) { + $_->{version} = $normalize_version->( $_->{version} ); + } + + return \%prime; + } +} + + +sub _init { + my $class = shift; + my $module = shift; + my $filename = shift; + my %props = @_; + + my( %valid_props, @valid_props ); + @valid_props = qw( collect_pod inc ); + @valid_props{@valid_props} = delete( @props{@valid_props} ); + warn "Unknown properties: @{[keys %props]}\n" if scalar( %props ); + + my %data = ( + module => $module, + filename => $filename, + version => undef, + packages => [], + versions => {}, + pod => {}, + pod_headings => [], + collect_pod => 0, + + %valid_props, + ); + + my $self = bless(\%data, $class); + + $self->_parse_file(); + + unless($self->{module} and length($self->{module})) { + my ($v, $d, $f) = File::Spec->splitpath($self->{filename}); + if($f =~ /\.pm$/) { + $f =~ s/\..+$//; + my @candidates = grep /$f$/, @{$self->{packages}}; + $self->{module} = shift(@candidates); # punt + } + else { + if(grep /main/, @{$self->{packages}}) { + $self->{module} = 'main'; + } + else { + $self->{module} = $self->{packages}[0] || ''; + } + } + } + + $self->{version} = $self->{versions}{$self->{module}} + if defined( $self->{module} ); + + return $self; +} + +# class method +sub _do_find_module { + my $class = shift; + my $module = shift || die 'find_module_by_name() requires a package name'; + my $dirs = shift || \@INC; + + my $file = File::Spec->catfile(split( /::/, $module)); + foreach my $dir ( @$dirs ) { + my $testfile = File::Spec->catfile($dir, $file); + return [ File::Spec->rel2abs( $testfile ), $dir ] + if -e $testfile and !-d _; # For stuff like ExtUtils::xsubpp + return [ File::Spec->rel2abs( "$testfile.pm" ), $dir ] + if -e "$testfile.pm"; + } + return; +} + +# class method +sub find_module_by_name { + my $found = shift()->_do_find_module(@_) or return; + return $found->[0]; +} + +# class method +sub find_module_dir_by_name { + my $found = shift()->_do_find_module(@_) or return; + return $found->[1]; +} + + +# given a line of perl code, attempt to parse it if it looks like a +# $VERSION assignment, returning sigil, full name, & package name +sub _parse_version_expression { + my $self = shift; + my $line = shift; + + my( $sig, $var, $pkg ); + if ( $line =~ $VERS_REGEXP ) { + ( $sig, $var, $pkg ) = $2 ? ( $1, $2, $3 ) : ( $4, $5, $6 ); + if ( $pkg ) { + $pkg = ($pkg eq '::') ? 'main' : $pkg; + $pkg =~ s/::$//; + } + } + + return ( $sig, $var, $pkg ); +} + +sub _parse_file { + my $self = shift; + + my $filename = $self->{filename}; + open( my $fh, '<', $filename ) + or die( "Can't open '$filename': $!" ); + + $self->_parse_fh($fh); +} + +sub _parse_fh { + my ($self, $fh) = @_; + + my( $in_pod, $seen_end, $need_vers ) = ( 0, 0, 0 ); + my( @pkgs, %vers, %pod, @pod ); + my $pkg = 'main'; + my $pod_sect = ''; + my $pod_data = ''; + + while (defined( my $line = <$fh> )) { + my $line_num = $.; + + chomp( $line ); + next if $line =~ /^\s*#/; + + $in_pod = ($line =~ /^=(?!cut)/) ? 1 : ($line =~ /^=cut/) ? 0 : $in_pod; + + # Would be nice if we could also check $in_string or something too + last if !$in_pod && $line =~ /^__(?:DATA|END)__$/; + + if ( $in_pod || $line =~ /^=cut/ ) { + + if ( $line =~ /^=head\d\s+(.+)\s*$/ ) { + push( @pod, $1 ); + if ( $self->{collect_pod} && length( $pod_data ) ) { + $pod{$pod_sect} = $pod_data; + $pod_data = ''; + } + $pod_sect = $1; + + + } elsif ( $self->{collect_pod} ) { + $pod_data .= "$line\n"; + + } + + } else { + + $pod_sect = ''; + $pod_data = ''; + + # parse $line to see if it's a $VERSION declaration + my( $vers_sig, $vers_fullname, $vers_pkg ) = + $self->_parse_version_expression( $line ); + + if ( $line =~ $PKG_REGEXP ) { + $pkg = $1; + push( @pkgs, $pkg ) unless grep( $pkg eq $_, @pkgs ); + $vers{$pkg} = (defined $2 ? $2 : undef) unless exists( $vers{$pkg} ); + $need_vers = defined $2 ? 0 : 1; + + # VERSION defined with full package spec, i.e. $Module::VERSION + } elsif ( $vers_fullname && $vers_pkg ) { + push( @pkgs, $vers_pkg ) unless grep( $vers_pkg eq $_, @pkgs ); + $need_vers = 0 if $vers_pkg eq $pkg; + + unless ( defined $vers{$vers_pkg} && length $vers{$vers_pkg} ) { + $vers{$vers_pkg} = + $self->_evaluate_version_line( $vers_sig, $vers_fullname, $line ); + } else { + # Warn unless the user is using the "$VERSION = eval + # $VERSION" idiom (though there are probably other idioms + # that we should watch out for...) + warn <<"EOM" unless $line =~ /=\s*eval/; +Package '$vers_pkg' already declared with version '$vers{$vers_pkg}', +ignoring subsequent declaration on line $line_num. +EOM + } + + # first non-comment line in undeclared package main is VERSION + } elsif ( !exists($vers{main}) && $pkg eq 'main' && $vers_fullname ) { + $need_vers = 0; + my $v = + $self->_evaluate_version_line( $vers_sig, $vers_fullname, $line ); + $vers{$pkg} = $v; + push( @pkgs, 'main' ); + + # first non-comment line in undeclared package defines package main + } elsif ( !exists($vers{main}) && $pkg eq 'main' && $line =~ /\w+/ ) { + $need_vers = 1; + $vers{main} = ''; + push( @pkgs, 'main' ); + + # only keep if this is the first $VERSION seen + } elsif ( $vers_fullname && $need_vers ) { + $need_vers = 0; + my $v = + $self->_evaluate_version_line( $vers_sig, $vers_fullname, $line ); + + + unless ( defined $vers{$pkg} && length $vers{$pkg} ) { + $vers{$pkg} = $v; + } else { + warn <<"EOM"; +Package '$pkg' already declared with version '$vers{$pkg}' +ignoring new version '$v' on line $line_num. +EOM + } + + } + + } + + } + + if ( $self->{collect_pod} && length($pod_data) ) { + $pod{$pod_sect} = $pod_data; + } + + $self->{versions} = \%vers; + $self->{packages} = \@pkgs; + $self->{pod} = \%pod; + $self->{pod_headings} = \@pod; +} + +{ +my $pn = 0; +sub _evaluate_version_line { + my $self = shift; + my( $sigil, $var, $line ) = @_; + + # Some of this code came from the ExtUtils:: hierarchy. + + # We compile into $vsub because 'use version' would cause + # compiletime/runtime issues with local() + my $vsub; + $pn++; # everybody gets their own package + my $eval = qq{BEGIN { q# Hide from _packages_inside() + #; package Module::Metadata::_version::p$pn; + use version; + no strict; + + local $sigil$var; + \$$var=undef; + \$vsub = sub { + $line; + \$$var + }; + }}; + + local $^W; + # Try to get the $VERSION + eval $eval; + # some modules say $VERSION = $Foo::Bar::VERSION, but Foo::Bar isn't + # installed, so we need to hunt in ./lib for it + if ( $@ =~ /Can't locate/ && -d 'lib' ) { + local @INC = ('lib',@INC); + eval $eval; + } + warn "Error evaling version line '$eval' in $self->{filename}: $@\n" + if $@; + (ref($vsub) eq 'CODE') or + die "failed to build version sub for $self->{filename}"; + my $result = eval { $vsub->() }; + die "Could not get version from $self->{filename} by executing:\n$eval\n\nThe fatal error was: $@\n" + if $@; + + # Upgrade it into a version object + my $version = eval { _dwim_version($result) }; + + die "Version '$result' from $self->{filename} does not appear to be valid:\n$eval\n\nThe fatal error was: $@\n" + unless defined $version; # "0" is OK! + + return $version; +} +} + +# Try to DWIM when things fail the lax version test in obvious ways +{ + my @version_prep = ( + # Best case, it just works + sub { return shift }, + + # If we still don't have a version, try stripping any + # trailing junk that is prohibited by lax rules + sub { + my $v = shift; + $v =~ s{([0-9])[a-z-].*$}{$1}i; # 1.23-alpha or 1.23b + return $v; + }, + + # Activestate apparently creates custom versions like '1.23_45_01', which + # cause version.pm to think it's an invalid alpha. So check for that + # and strip them + sub { + my $v = shift; + my $num_dots = () = $v =~ m{(\.)}g; + my $num_unders = () = $v =~ m{(_)}g; + my $leading_v = substr($v,0,1) eq 'v'; + if ( ! $leading_v && $num_dots < 2 && $num_unders > 1 ) { + $v =~ s{_}{}g; + $num_unders = () = $v =~ m{(_)}g; + } + return $v; + }, + + # Worst case, try numifying it like we would have before version objects + sub { + my $v = shift; + no warnings 'numeric'; + return 0 + $v; + }, + + ); + + sub _dwim_version { + my ($result) = shift; + + return $result if ref($result) eq 'version'; + + my ($version, $error); + for my $f (@version_prep) { + $result = $f->($result); + $version = eval { version->new($result) }; + $error ||= $@ if $@; # capture first failure + last if defined $version; + } + + die $error unless defined $version; + + return $version; + } +} + +############################################################ + +# accessors +sub name { $_[0]->{module} } + +sub filename { $_[0]->{filename} } +sub packages_inside { @{$_[0]->{packages}} } +sub pod_inside { @{$_[0]->{pod_headings}} } +sub contains_pod { $#{$_[0]->{pod_headings}} } + +sub version { + my $self = shift; + my $mod = shift || $self->{module}; + my $vers; + if ( defined( $mod ) && length( $mod ) && + exists( $self->{versions}{$mod} ) ) { + return $self->{versions}{$mod}; + } else { + return undef; + } +} + +sub pod { + my $self = shift; + my $sect = shift; + if ( defined( $sect ) && length( $sect ) && + exists( $self->{pod}{$sect} ) ) { + return $self->{pod}{$sect}; + } else { + return undef; + } +} + +1; + +=head1 NAME + +Module::Metadata - Gather package and POD information from perl module files + +=head1 DESCRIPTION + +=over 4 + +=item new_from_file($filename, collect_pod => 1) + +Construct a C object given the path to a file. Takes an optional +argument C which is a boolean that determines whether +POD data is collected and stored for reference. POD data is not +collected by default. POD headings are always collected. + +=item new_from_module($module, collect_pod => 1, inc => \@dirs) + +Construct a C object given a module or package name. In addition +to accepting the C argument as described above, this +method accepts a C argument which is a reference to an array of +of directories to search for the module. If none are given, the +default is @INC. + +=item name() + +Returns the name of the package represented by this module. If there +are more than one packages, it makes a best guess based on the +filename. If it's a script (i.e. not a *.pm) the package name is +'main'. + +=item version($package) + +Returns the version as defined by the $VERSION variable for the +package as returned by the C method if no arguments are +given. If given the name of a package it will attempt to return the +version of that package if it is specified in the file. + +=item filename() + +Returns the absolute path to the file. + +=item packages_inside() + +Returns a list of packages. + +=item pod_inside() + +Returns a list of POD sections. + +=item contains_pod() + +Returns true if there is any POD in the file. + +=item pod($section) + +Returns the POD data in the given section. + +=item find_module_by_name($module, \@dirs) + +Returns the path to a module given the module or package name. A list +of directories can be passed in as an optional parameter, otherwise +@INC is searched. + +Can be called as either an object or a class method. + +=item find_module_dir_by_name($module, \@dirs) + +Returns the entry in C<@dirs> (or C<@INC> by default) that contains +the module C<$module>. A list of directories can be passed in as an +optional parameter, otherwise @INC is searched. + +Can be called as either an object or a class method. + +=item package_versions_from_directory($dir, \@files?) + +Scans C<$dir> for .pm files (unless C<@files> is given, in which case looks +for those files in C<$dir> - and reads each file for packages and versions, +returning a hashref of the form: + + { + 'Package::Name' => { + version => '0.123', + file => 'Package/Name.pm' + }, + 'OtherPackage::Name' => ... + } + +=item log_info (internal) + +Used internally to perform logging; imported from Log::Contextual if +Log::Contextual has already been loaded, otherwise simply calls warn. + +=back + +=head1 AUTHOR + +Ken Williams , Randy W. Sims + +Released as Module::Metadata by Matt S Trout (mst) with +assistance from David Golden (xdg) + +=head1 COPYRIGHT + +Copyright (c) 2001-2006 Ken Williams. All rights reserved. + +This library is free software; you can redistribute it and/or +modify it under the same terms as Perl itself. + +=head1 SEE ALSO + +perl(1), L(3) + +=cut + diff --git a/inc/Perl/OSType.pm b/inc/Perl/OSType.pm new file mode 100644 index 0000000..6c2cf12 --- /dev/null +++ b/inc/Perl/OSType.pm @@ -0,0 +1,174 @@ +# +# This file is part of Perl-OSType +# +# This software is copyright (c) 2010 by David Golden. +# +# This is free software; you can redistribute it and/or modify it under +# the same terms as the Perl 5 programming language system itself. +# +use strict; +use warnings; +package Perl::OSType; +BEGIN { + $Perl::OSType::VERSION = '1.002'; +} +# ABSTRACT: Map Perl operating system names to generic types + +require Exporter; +our @ISA = qw(Exporter); + +our %EXPORT_TAGS = ( + all => [ qw( os_type is_os_type ) ] +); + +our @EXPORT_OK = @{ $EXPORT_TAGS{all} }; + +# originally taken from Module::Build by Ken Williams et al. +my %OSTYPES = qw( + aix Unix + bsdos Unix + beos Unix + dgux Unix + dragonfly Unix + dynixptx Unix + freebsd Unix + linux Unix + haiku Unix + hpux Unix + iphoneos 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 + qnx 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 +); + +sub os_type { + my ($os) = @_; + $os = $^O unless defined $os; + return $OSTYPES{ $os } || q{}; +} + +sub is_os_type { + my ($type, $os) = @_; + return unless $type; + $os = $^O unless defined $os; + return os_type($os) eq $type; +} + +1; + + +=pod + +=head1 NAME + +Perl::OSType - Map Perl operating system names to generic types + +=head1 VERSION + +version 1.002 + +=head1 SYNOPSIS + + use Perl::OSType ':all'; + + $current_type = os_type(); + $other_type = os_type('dragonfly'); # gives 'Unix' + +=head1 DESCRIPTION + +Modules that provide OS-specific behaviors often need to know if +the current operating system matches a more generic type of +operating systems. For example, 'linux' is a type of 'Unix' operating system +and so is 'freebsd'. + +This module provides a mapping between an operating system name as given by +C<$^O> and a more generic type. The initial version is based on the OS type +mappings provided in L and L. (Thus, +Microsoft operating systems are given the type 'Windows' rather than 'Win32'.) + +=head1 USAGE + +No functions are exported by default. The export tag ":all" will export +all functions listed below. + +=head2 os_type() + + $os_type = os_type(); + $os_type = os_type('MSWin32'); + +Returns a single, generic OS type for a given operating system name. With no +arguments, returns the OS type for the current value of C<$^O>. If the +operating system is not recognized, the function will return the empty string. + +=head2 is_os_type() + + $is_windows = is_os_type('Windows'); + $is_unix = is_os_type('Unix', 'dragonfly'); + +Given an OS type and OS name, returns true or false if the OS name is of the +given type. As with C, it will use the current operating system as a +default if no OS name is provided. + +=head1 SEE ALSO + +=over 4 + +=item * + +L + +=back + +=head1 AUTHOR + +David Golden + +=head1 COPYRIGHT AND LICENSE + +This software is copyright (c) 2010 by David Golden. + +This is free software; you can redistribute it and/or modify it under +the same terms as the Perl 5 programming language system itself. + +=cut + + +__END__ + + diff --git a/inc/bootstrap.pl b/inc/bootstrap.pl new file mode 100644 index 0000000..2011fc7 --- /dev/null +++ b/inc/bootstrap.pl @@ -0,0 +1,47 @@ +# bootstrap.pl +# bootstrap modules in inc/ for use during configuration with +# either Build.PL or Makefile.PL + +my @exit_warn; + +END { + warn "\nThese additional prerequisites must be installed:\n requires:\n" + if @exit_warn; + while( my $h = shift @exit_warn ) { + my ($mod, $min) = @$h; + warn " ! $mod (we need version $min)\n"; + } +} + +BEGIN { + if ( ! eval "use Perl::OSType 1 (); 1" ) { + print "*** BOOTSTRAPPING Perl::OSType ***\n"; + push @exit_warn, [ 'Perl::OSType', '1.00' ]; + delete $INC{'Perl/OSType.pm'}; + local @INC = @INC; + push @INC, 'inc'; + eval "require Perl::OSType; 1" + or die "BOOSTRAP FAIL: $@"; + } + if ( ! eval "use version 0.87 (); 1" ) { + print "*** BOOTSTRAPPING version ***\n"; + push @exit_warn, [ 'version', '0.87' ]; + delete $INC{'version.pm'}; + local @INC = @INC; + push @INC, 'inc'; + eval "require MBVersion; 1" + or die "BOOSTRAP FAIL: $@"; + } + if ( ! eval "use Module::Metadata 1.000002 (); 1" ) { + print "*** BOOTSTRAPPING Module::Metadata ***\n"; + push @exit_warn, [ 'Module::Metadata', '1.000002' ]; + delete $INC{'Module/Metadata.pm'}; + local @INC = @INC; + push @INC, 'inc'; + eval "require Module::Metadata; 1" + or die "BOOSTRAP FAIL: $@"; + } +} + +1; + diff --git a/lib/Module/Build.pm b/lib/Module/Build.pm new file mode 100644 index 0000000..5bb815a --- /dev/null +++ b/lib/Module/Build.pm @@ -0,0 +1,1118 @@ +package Module::Build; + +use if $] >= 5.019, 'deprecate'; + +# 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 5.006; +use strict; +use warnings; +use File::Spec (); +use File::Path (); +use File::Basename (); +use Perl::OSType (); + +use Module::Build::Base; + +our @ISA = qw(Module::Build::Base); +our $VERSION = '0.4214'; +$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 + Build test + Build install + + +=head1 DESCRIPTION + +C is a system for building, testing, and installing +Perl modules. It is meant to be an alternative to +C. Developers may alter the behavior of the +module through subclassing in a much more straightforward way than +with C. It also does not require a C on your system +- most of the C code is pure-perl and written in a very +cross-platform way. + +See L<"MOTIVATIONS"> for more comparisons between C +and C. + +To install C, and any other module that uses +C for its installation process, do the following: + + perl Build.PL # 'Build.PL' script creates the 'Build' script + ./Build # Need ./ to ensure we're using this "Build" script + ./Build test # and not another one that happens to be in the PATH + ./Build install + +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: + + build manifest + clean manifest_skip + code manpages + config_data pardist + diff ppd + dist ppmdist + distcheck prereq_data + distclean prereq_report + distdir pure_install + distinstall realclean + distmeta retest + distsign skipcheck + disttest test + docs testall + fakeinstall testcover + help testdb + html testpod + install testpodcoverage + installdeps versioninstall + +You can run the 'help' action for a complete list of actions. + + +=head1 GUIDE TO DOCUMENTATION + +The documentation for C is broken up into sections: + +=over + +=item General Usage (L) + +This is the document you are currently reading. It describes basic +usage and background information. Its main purpose is to assist the +user who wants to learn how to invoke and control C +scripts at the command line. + +=item Authoring Reference (L) + +This document describes the structure and organization of +C, and the relevant concepts needed by authors who are +writing F scripts for a distribution or controlling +C processes programmatically. + +=item API Reference (L) + +This is a reference to the C API. + +=item Cookbook (L) + +This document demonstrates how to accomplish many common tasks. It +covers general command line usage and authoring of F +scripts. Includes working examples. + +=back + + +=head1 ACTIONS + +There are some general principles at work here. First, each task when +building a module is called an "action". These actions are listed +above; they correspond to the building, testing, installing, +packaging, etc., tasks. + +Second, arguments are processed in a very systematic way. Arguments +are always key=value pairs. They may be specified at C +time (i.e. C), in which case +their values last for the lifetime of the C script. They may +also be specified when executing a particular action (i.e. +C), in which case their values last only for the +lifetime of that command. Per-action command line parameters take +precedence over parameters specified at C time. + +The build process also relies heavily on the C module. +If the user wishes to override any of the +values in C, she may specify them like so: + + perl Build.PL --config cc=gcc --config ld=gcc + +The following build actions are provided by default. + +=over 4 + +=item build + +[version 0.01] + +If you run the C script without any arguments, it runs the +C action, which in turn runs the C and C actions. + +This is analogous to the C I target. + +=item clean + +[version 0.01] + +This action will clean up any files that the build process may have +created, including the C directory (but not including the +C<_build/> directory and the C script itself). + +=item code + +[version 0.20] + +This action builds your code base. + +By default it just creates a C directory and copies any C<.pm> +and C<.pod> files from your C directory into the C +directory. It also compiles any C<.xs> files from C and places +them in C. Of course, you need a working C compiler (probably +the same one that built perl itself) for the compilation to work +properly. + +The C action also runs any C<.PL> files in your F +directory. Typically these create other files, named the same but +without the C<.PL> ending. For example, a file F +could create the file F. The C<.PL> files are +processed first, so any C<.pm> files (or other kinds that we deal +with) will get copied correctly. + +=item config_data + +[version 0.26] + +... + +=item diff + +[version 0.14] + +This action will compare the files about to be installed with their +installed counterparts. For .pm and .pod files, a diff will be shown +(this currently requires a 'diff' program to be in your PATH). For +other files like compiled binary files, we simply report whether they +differ. + +A C parameter may be passed to the action, which will be passed +to the 'diff' program. Consult your 'diff' documentation for the +parameters it will accept - a good one is C<-u>: + + ./Build diff flags=-u + +=item dist + +[version 0.02] + +This action is helpful for module authors who want to package up their +module for source distribution through a medium like CPAN. It will create a +tarball of the files listed in F and compress the tarball using +GZIP compression. + +By default, this action will use the C module. However, you can +force it to use binary "tar" and "gzip" executables by supplying an explicit +C (and optional C) parameter: + + ./Build dist --tar C:\path\to\tar.exe --gzip C:\path\to\zip.exe + +=item distcheck + +[version 0.05] + +Reports which files are in the build directory but not in the +F file, and vice versa. (See L for details.) + +=item distclean + +[version 0.05] + +Performs the 'realclean' action and then the 'distcheck' action. + +=item distdir + +[version 0.05] + +Creates a "distribution directory" named C<$dist_name-$dist_version> +(if that directory already exists, it will be removed first), then +copies all the files listed in the F 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, 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] + +Creates the F file that describes the distribution. + +F is a file containing various bits of I 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 in a simplified YAML format. + +F file must also be listed in F - if it's not, a +warning will be issued. + +The current version of the F specification can be found +on CPAN as L. + +=item distsign + +[version 0.16] + +Uses C to create a SIGNATURE file for your +distribution, and adds the SIGNATURE file to the distribution's +MANIFEST. + +=item disttest + +[version 0.05] + +Performs the 'distdir' action, then switches into that directory and runs a +C, 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 + +[version 0.20] + +This will generate documentation (e.g. Unix man pages and HTML +documents) for any installable items under B that +contain POD. If there are no C or C installation +targets defined (as will be the case on systems that don't support +Unix manpages) no action is taken for manpages. If there are no +C or C installation targets defined no action is +taken for HTML documents. + +=item fakeinstall + +[version 0.02] + +This is just like the C action, but it won't actually do +anything, it will just report what it I have done if you had +actually run the C action. + +=item help + +[version 0.03] + +This action will simply print out a message that is meant to help you +use the build process. It will show you a list of available build +actions too. + +With an optional argument specifying an action name (e.g. C), the 'help' action will show you any POD documentation it can +find for that action. + +=item html + +[version 0.26] + +This will generate HTML documentation for any binary or library files +under B that contain POD. The HTML documentation will only be +installed if the install paths can be determined from values in +C. You can also supply or override install paths on the +command line by specifying C values for the C +and/or C installation targets. + +With an optional C argument set to a false value, you can +skip the search for other documentation to link to, because that can +waste a lot of time if there aren't any links to generate anyway: + + ./Build html --html_links 0 + +=item install + +[version 0.01] + +This action will use C to install the files from +C into the system. See L<"INSTALL PATHS"> +for details about how Module::Build determines where to install +things, and how to influence this process. + +If you want the installation process to look around in C<@INC> for +other versions of the stuff you're installing and try to delete it, +you can use the C parameter, which tells C to +do so: + + ./Build install uninst=1 + +This can be a good idea, as it helps prevent multiple versions of a +module from being present on your system, which can be a confusing +situation indeed. + +=item installdeps + +[version 0.36] + +This action will use the C parameter as a command to install +missing prerequisites. You will be prompted whether to install +optional dependencies. + +The C option defaults to 'cpan' but can be set as an option or in +F<.modulebuildrc>. It must be a shell command that takes a list of modules to +install as arguments (e.g. 'cpanp -i' for CPANPLUS). If the program part is a +relative path (e.g. 'cpan' or 'cpanp'), it will be located relative to the perl +program that executed Build.PL. + + /opt/perl/5.8.9/bin/perl Build.PL + ./Build installdeps --cpan_client 'cpanp -i' + # installs to 5.8.9 + +=item manifest + +[version 0.05] + +This is an action intended for use by module authors, not people +installing modules. It will bring the F up to date with the +files currently present in the distribution. You may use a +F file to exclude certain files or directories from +inclusion in the F. F should contain a bunch +of regular expressions, one per line. If a file in the distribution +directory matches any of the regular expressions, it won't be included +in the F. + +The following is a reasonable F starting point, you can +add your own stuff to it: + + ^_build + ^Build$ + ^blib + ~$ + \.bak$ + ^MANIFEST\.SKIP$ + CVS + +See the L and L actions if you want to find out +what the C 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] + +This will generate man pages for any binary or library files under +B that contain POD. The man pages will only be installed if the +install paths can be determined from values in C. You can +also supply or override install paths by specifying there values on +the command line with the C and C installation +targets. + +=item pardist + +[version 0.2806] + +Generates a PAR binary distribution for use with L or L. + +It requires that the PAR::Dist module (version 0.17 and up) is +installed on your system. + +=item ppd + +[version 0.20] + +Build a PPD file for your distribution. + +This action takes an optional argument C which is used in +the generated PPD file to specify the (usually relative) URL of the +distribution. By default, this value is the distribution name without +any path information. + +Example: + + ./Build ppd --codebase "MSWin32-x86-multi-thread/Module-Build-0.21.tar.gz" + +=item ppmdist + +[version 0.23] + +Generates a PPM binary distribution and a PPD description file. This +action also invokes the C action, so it can accept the same +C argument described under that action. + +This uses the same mechanism as the C action to tar & zip its +output, so you can supply C and/or C parameters to affect +the result. + +=item prereq_data + +[version 0.32] + +This action prints out a Perl data structure of all prerequisites and the versions +required. The output can be loaded again using C. This can be useful for +external tools that wish to query a Build script for prerequisites. + +=item prereq_report + +[version 0.28] + +This action prints out a list of all prerequisites, the versions required, and +the versions actually installed. This can be useful for reviewing the +configuration of your system prior to a build, or when compiling data to send +for a bug report. + +=item pure_install + +[version 0.28] + +This action is identical to the C action. In the future, +though, when C starts writing to the file +F<$(INSTALLARCHLIB)/perllocal.pod>, C won't, and that +will be the only difference between them. + +=item realclean + +[version 0.01] + +This action is just like the C action, but also removes the +C<_build> directory and the C script. If you run the +C action, you are essentially starting over, so you will +have to re-create the C script again. + +=item retest + +[version 0.2806] + +This is just like the C action, but doesn't actually build the +distribution first, and doesn't add F to the load path, and +therefore will test against a I installed version of the +distribution. This can be used to verify that a certain installed +distribution still works, or to see whether newer versions of a +distribution still pass the old regression tests, and so on. + +=item skipcheck + +[version 0.05] + +Reports which files are skipped due to the entries in the +F file (See L for details) + +=item test + +[version 0.01] + +This will use C or C to run any regression +tests and report their results. Tests can be defined in the standard +places: a file called C in the top-level directory, or several +files ending with C<.t> in a C directory. + +If you want tests to be 'verbose', i.e. show details of test execution +rather than just summary information, pass the argument C. + +If you want to run tests under the perl debugger, pass the argument +C. + +If you want to have Module::Build find test files with different file +name extensions, pass the C argument with an array +of extensions, such as C<[qw( .t .s .z )]>. + +If you want test to be run by C, rather than C, +pass the argument C as an array reference of arguments to +pass to the TAP::Harness constructor. + +In addition, if a file called C exists in the top-level +directory, this file will be executed as a Perl script and its output +will be shown to the user. This is a good place to put speed tests or +other tests that don't use the C format for output. + +To override the choice of tests to run, you may pass a C +argument whose value is a whitespace-separated list of test scripts to +run. This is especially useful in development, when you only want to +run a single test to see whether you've squashed a certain bug yet: + + ./Build test --test_files t/something_failing.t + +You may also pass several C arguments separately: + + ./Build test --test_files t/one.t --test_files t/two.t + +or use a C-style pattern: + + ./Build test --test_files 't/01-*.t' + +=item testall + +[version 0.2807] + +[Note: the 'testall' action and the code snippets below are currently +in alpha stage, see +L<"http://www.nntp.perl.org/group/perl.module.build/2007/03/msg584.html"> ] + +Runs the C action plus each of the C actions defined by +the keys of the C parameter. + +Currently, you need to define the ACTION_test$type method yourself and +enumerate them in the test_types parameter. + + my $mb = Module::Build->subclass( + code => q( + sub ACTION_testspecial { shift->generic_test(type => 'special'); } + sub ACTION_testauthor { shift->generic_test(type => 'author'); } + ) + )->new( + ... + test_types => { + special => '.st', + author => ['.at', '.pt' ], + }, + ... + +=item testcover + +[version 0.26] + +Runs the C action using C, generating a +code-coverage report showing which parts of the code were actually +exercised during the tests. + +To pass options to C, set the C<$DEVEL_COVER_OPTIONS> +environment variable: + + DEVEL_COVER_OPTIONS=-ignore,Build ./Build testcover + +=item testdb + +[version 0.05] + +This is a synonym for the 'test' action with the C +argument. + +=item testpod + +[version 0.25] + +This checks all the files described in the C action and +produces C-style output. If you are a module author, +this is useful to run before creating a new release. + +=item testpodcoverage + +[version 0.28] + +This checks the pod coverage of the distribution and +produces C-style output. If you are a module author, +this is useful to run before creating a new release. + +=item versioninstall + +[version 0.16] + +** Note: since C is so new, and since we just recently added +support for it here too, this feature is to be considered +experimental. ** + +If you have the C module installed on your system, you can +use this action to install a module into the version-specific library +trees. This means that you can have several versions of the same +module installed and C a specific one like this: + + use only MyModule => 0.55; + +To override the default installation libraries in C, +specify the C parameter when you run the C script: + + perl Build.PL --versionlib /my/version/place/ + +To override which version the module is installed as, specify the +C parameter when you run the C script: + + perl Build.PL --version 0.50 + +See the C documentation for more information on +version-specific installs. + +=back + + +=head1 OPTIONS + +=head2 Command Line Options + +The following options can be used during any invocation of C +or the Build script, during any action. For information on other +options specific to an action, see the documentation for the +respective action. + +NOTE: There is some preliminary support for options to use the more +familiar long option style. Most options can be preceded with the +C<--> long option prefix, and the underscores changed to dashes +(e.g. C<--use-rcfile>). Additionally, the argument to boolean options is +optional, and boolean options can be negated by prefixing them with +C or C (e.g. C<--noverbose> or C<--no-verbose>). + +=over 4 + +=item quiet + +Suppress informative messages on output. + +=item verbose + +Display extra information about the Build on output. C will +turn off C + +=item cpan_client + +Sets the C command for use with the C action. +See C for more details. + +=item use_rcfile + +Load the F<~/.modulebuildrc> option file. This option can be set to +false to prevent the custom resource file from being loaded. + +=item allow_mb_mismatch + +Suppresses the check upon startup that the version of Module::Build +we're now running under is the same version that was initially invoked +when building the distribution (i.e. when the C script was +first run). As of 0.3601, a mismatch results in a warning instead of +a fatal error, so this option effectively just suppresses the warning. + +=item debug + +Prints Module::Build debugging information to STDOUT, such as a trace of +executed build actions. + +=back + +=head2 Default Options File (F<.modulebuildrc>) + +[version 0.28] + +When Module::Build starts up, it will look first for a file, +F<$ENV{HOME}/.modulebuildrc>. If it's not found there, it will look +in the F<.modulebuildrc> file in the directories referred to by +the environment variables C + C, C, +C, C, C. If the file exists, the options +specified there will be used as defaults, as if they were typed on the +command line. The defaults can be overridden by specifying new values +on the command line. + +The action name must come at the beginning of the line, followed by any +amount of whitespace and then the options. Options are given the same +as they would be on the command line. They can be separated by any +amount of whitespace, including newlines, as long there is whitespace at +the beginning of each continued line. Anything following a hash mark (C<#>) +is considered a comment, and is stripped before parsing. If more than +one line begins with the same action name, those lines are merged into +one set of options. + +Besides the regular actions, there are two special pseudo-actions: the +key C<*> (asterisk) denotes any global options that should be applied +to all actions, and the key 'Build_PL' specifies options to be applied +when you invoke C. + + * verbose=1 # global options + diff flags=-u + install --install_base /home/ken + --install_path html=/home/ken/docs/html + installdeps --cpan_client 'cpanp -i' + +If you wish to locate your resource file in a different location, you +can set the environment variable C to the complete +absolute path of the file containing your options. + +=head2 Environment variables + +=over + +=item MODULEBUILDRC + +[version 0.28] + +Specifies an alternate location for a default options file as described above. + +=item PERL_MB_OPT + +[version 0.36] + +Command line options that are applied to Build.PL or any Build action. The +string is split as the shell would (e.g. whitespace) and the result is +prepended to any actual command-line arguments. + +=back + +=head1 INSTALL PATHS + +[version 0.19] + +When you invoke Module::Build's C action, it needs to figure +out where to install things. The nutshell version of how this works +is that default installation locations are determined from +F, and they may be overridden by using the C +parameter. An C parameter lets you specify an +alternative installation root like F, and a C lets +you specify a temporary installation directory like F in +case you want to create bundled-up installable packages. + +Natively, Module::Build provides default installation locations for +the following types of installable items: + +=over 4 + +=item lib + +Usually pure-Perl module files ending in F<.pm>. + +=item arch + +"Architecture-dependent" module files, usually produced by compiling +XS, L, or similar code. + +=item script + +Programs written in pure Perl. In order to improve reuse, try to make +these as small as possible - put the code into modules whenever +possible. + +=item bin + +"Architecture-dependent" executable programs, i.e. compiled C code or +something. Pretty rare to see this in a perl distribution, but it +happens. + +=item bindoc + +Documentation for the stuff in C