Skip to content

Instantly share code, notes, and snippets.

@oetiker
Last active August 17, 2016 05:56
Show Gist options
  • Save oetiker/c62874b5bd03d83d209f39e1098083ff to your computer and use it in GitHub Desktop.
Save oetiker/c62874b5bd03d83d209f39e1098083ff to your computer and use it in GitHub Desktop.
sub MY::postamble {
my $self = shift;
my %r = (%{ $self->{PREREQ_PM} || {} }, %{ $self->{BUILD_REQUIRES} || {} }, %{ $self->{TEST_REQUIRES} || {} } );
my $modules = join " ", grep !/^perl\@/, map { $r{$_} ? $_ .'@'. $r{$_} : $_ } keys %r;
my $tpd = "$FindBin::RealBin/3rd";
warn "** call 'make builddeps' to build missing dependencies ...\n";
return <<"EOF";
builddeps: $tpd/touch
mkdir -p $tpd
$tpd/touch: Makefile
\@echo "*** INSTALLING MISSING BITS FOR TESTING ***"
curl -L https://cpanmin.us | PERL_CPANM_HOME=$tpd \$(PERL) - -q --notest --local-lib-contained $tpd $modules && touch $tpd/touch
EOF
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment