Skip to content

Commit

Permalink
Fix prereq to META conversion for perl 5.10 with Module::Build 0.34 (…
Browse files Browse the repository at this point in the history
…which doesn't emit MYMETA)
  • Loading branch information
miyagawa committed Jun 18, 2013
1 parent 404dd7e commit cc9456f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/App/cpanminus/script.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2435,8 +2435,8 @@ sub extract_meta_prereqs {

if (-e '_build/prereqs') {
$self->chat("Checking dependencies from _build/prereqs ...\n");
my $mymeta = do { open my $in, "_build/prereqs"; $self->safe_eval(join "", <$in>) };
@deps = $self->extract_prereqs($mymeta, $dist);
my $prereqs = do { open my $in, "_build/prereqs"; $self->safe_eval(join "", <$in>) };
@deps = $self->extract_prereqs({ name => $meta->{name}, version => $meta->{version}, %$prereqs }, $dist);
} elsif (-e 'Makefile') {
$self->chat("Finding PREREQ from Makefile ...\n");
open my $mf, "Makefile";
Expand Down
16 changes: 16 additions & 0 deletions xt/build_no_mymeta.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
use strict;
use xt::Run;
use Test::More;

plan skip_all => "only on 5.10.1" if $] != 5.010001;

run '-n', 'Module::[email protected]';
like last_build_log, qr/installed Module-Build/;

run 'Hook::LexWrap';
unlike last_build_log, qr/Failed to upconvert metadata/;

done_testing;



0 comments on commit cc9456f

Please sign in to comment.