Author: kwilliams
Date: Wed Jul 26 19:40:55 2006
New Revision: 6719
Modified:
Module-Build/trunk/Changes
Module-Build/trunk/lib/Module/Build.pm
Module-Build/trunk/lib/Module/Build/Base.pm
Log:
Add --allow_mb_mismatch because I'm tired of bumping the M::B version and then
discovering I can't do 'Build realclean' anymore
Modified: Module-Build/trunk/Changes
==============================================================================
--- Module-Build/trunk/Changes (original)
+++ Module-Build/trunk/Changes Wed Jul 26 19:40:55 2006
@@ -14,6 +14,11 @@
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.
+
0.2804 Sun Jul 16 16:41:25 CDT 2006
- Added 'use version;' in Module::Build::Version, because some
Modified: Module-Build/trunk/lib/Module/Build.pm
==============================================================================
--- Module-Build/trunk/lib/Module/Build.pm (original)
+++ Module-Build/trunk/lib/Module/Build.pm Wed Jul 26 19:40:55 2006
@@ -644,6 +644,13 @@
Display extra information about the Build on output.
+=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<Build.PL> script was
+first run). Use with caution.
+
=back
Modified: Module-Build/trunk/lib/Module/Build/Base.pm
==============================================================================
--- Module-Build/trunk/lib/Module/Build/Base.pm (original)
+++ Module-Build/trunk/lib/Module/Build/Base.pm Wed Jul 26 19:40:55 2006
@@ -68,12 +68,15 @@
" but we are now using '$perl'.\n");
}
- my $mb_version = $Module::Build::VERSION;
- die(" * ERROR: Configuration was initially created with Module::Build
version '$self->{properties}{mb_version}',\n".
- " but we are now using version '$mb_version'. Please re-run the
Build.PL or Makefile.PL script.\n")
- unless $mb_version eq $self->{properties}{mb_version};
-
$self->cull_args(@ARGV);
+
+ unless ($self->allow_mb_mismatch) {
+ my $mb_version = $Module::Build::VERSION;
+ die(" * ERROR: Configuration was initially created with Module::Build
version '$self->{properties}{mb_version}',\n".
+ " but we are now using version '$mb_version'. Please re-run the
Build.PL or Makefile.PL script.\n")
+ if $mb_version ne $self->{properties}{mb_version};
+ }
+
$self->{invoked_action} = $self->{action} ||= 'build';
return $self;
@@ -755,6 +758,7 @@
__PACKAGE__->add_property(recurse_into => []);
__PACKAGE__->add_property(use_rcfile => 1);
__PACKAGE__->add_property(create_packlist => 1);
+__PACKAGE__->add_property(allow_mb_mismatch => 0);
{
my $Is_ActivePerl = eval {require ActivePerl::DocTools};