[svn:Module-Build] r12853 - in Module-Build/trunk: . lib/Module/Build t

[email protected]
Newsgroups perl.module.build.checkins
Message-ID <[email protected]>
Author: dagolden
Date: Tue Jun 16 19:54:17 2009
New Revision: 12853

Modified:
   Module-Build/trunk/Changes
   Module-Build/trunk/lib/Module/Build/Base.pm
   Module-Build/trunk/t/metadata.t

Log:
don't add M::B to it's own configure/build_requires

Modified: Module-Build/trunk/Changes
==============================================================================
--- Module-Build/trunk/Changes	(original)
+++ Module-Build/trunk/Changes	Tue Jun 16 19:54:17 2009
@@ -2,6 +2,9 @@
 
 0.33_03 - 
 
+ Bug-fixes:
+ - Removes Module::Build from its own configure/build_requires
+
 0.33_02 - Mon Jun 15 12:23:55 EDT 2009
 
  Bug-fixes:

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	Tue Jun 16 19:54:17 2009
@@ -3694,7 +3694,9 @@
 
   # add current Module::Build to configure_requires if there 
   # isn't a configure_requires already specified
-  if ( ! $prereq_types{'configure_requires'} ) {
+  if ( $self->dist_name ne 'Module-Build' 
+    && ! $prereq_types{'configure_requires'} 
+  ) {
     for my $t ('configure_requires', 'build_requires') {
       $prereq_types{$t}{'Module::Build'} = $VERSION;
     }

Modified: Module-Build/trunk/t/metadata.t
==============================================================================
--- Module-Build/trunk/t/metadata.t	(original)
+++ Module-Build/trunk/t/metadata.t	Tue Jun 16 19:54:17 2009
@@ -2,7 +2,7 @@
 
 use strict;
 use lib $ENV{PERL_CORE} ? '../lib/Module/Build/t/lib' : 't/lib';
-use MBTest tests => 51;
+use MBTest tests => 53;
 
 use_ok 'Module::Build';
 ensure_blib('Module::Build');
@@ -64,6 +64,7 @@
 # Test for valid META.yml
 
 {
+  my $mb_prereq = { 'Module::Build' => $Module::Build::VERSION };
   my $node = $mb->prepare_metadata( {} );
 
   # exists() doesn't seem to work here
@@ -72,6 +73,8 @@
   is $node->{abstract}, $metadata{dist_abstract};
   is_deeply $node->{author}, $metadata{dist_author};
   is $node->{license}, $metadata{license};
+  is_deeply $node->{configure_requires}, $mb_prereq, 'Add M::B to configure_requires';
+  is_deeply $node->{build_requires}, $mb_prereq, 'Add M::B to build_requires';
   like $node->{generated_by}, qr{Module::Build};
   ok defined( $node->{'meta-spec'}{version} ),
       "'meta-spec' -> 'version' field present in META.yml";
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.