diff options
author | David Golden <dagolden@cpan.org> | 2011-06-24 20:52:33 -0400 |
---|---|---|
committer | Florian Ragwitz <rafl@debian.org> | 2011-09-05 14:14:49 +0200 |
commit | bc0314ad6419448c1e674af7c715a710cbcac024 (patch) | |
tree | 9045379b42c8c55a9f0f6543aed7531c3b6c0bcf | |
parent | 2fb8701d0595f8b51f4c99fa8a7ad46e47e34b4e (diff) | |
download | perl-bc0314ad6419448c1e674af7c715a710cbcac024.tar.gz |
configure_requires should only check META
It should not check MYMETA if for some reason configure_requires
is checked again after MYMETA has been created.
This patch adds a regex filter to the check for the meta file.
-rw-r--r-- | cpan/CPAN/lib/CPAN/Distribution.pm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/cpan/CPAN/lib/CPAN/Distribution.pm b/cpan/CPAN/lib/CPAN/Distribution.pm index b39e723fd2..8a3370a3c7 100644 --- a/cpan/CPAN/lib/CPAN/Distribution.pm +++ b/cpan/CPAN/lib/CPAN/Distribution.pm @@ -584,7 +584,8 @@ EOF #-> sub CPAN::Distribution::pick_meta_file ; sub pick_meta_file { - my($self, $yaml) = @_; + my($self, $filter) = @_; + $filter = '.' unless defined $filter; my $build_dir; unless ($build_dir = $self->{build_dir}) { @@ -602,7 +603,7 @@ sub pick_meta_file { push @choices, 'META.json' if $has_cm; push @choices, 'META.yml' if $has_cm || $has_pcm; - for my $file ( @choices ) { + for my $file ( grep { /$filter/ } @choices ) { my $path = File::Spec->catdir( $build_dir, $file ); return $path if -f $path } @@ -2903,7 +2904,7 @@ sub read_yaml { #-> sub CPAN::Distribution::configure_requires ; sub configure_requires { my($self) = @_; - return unless my $meta_file = $self->pick_meta_file; + return unless my $meta_file = $self->pick_meta_file('^META'); if (my $meta_obj = $self->read_meta) { my $prereqs = $meta_obj->effective_prereqs; my $cr = $prereqs->requirements_for(qw/configure requires/); |