From aa5d1a0c06079ed3a7e104f63afbf7fbed7ff3b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tina=20M=C3=BCller=20=28tinita=29?= Date: Wed, 17 Mar 2021 15:38:06 +0100 Subject: [PATCH] Read BUILD_REQUIRES and TEST_REQUIRES from Makefile.PL (#28) --- lib/Intrusive.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/Intrusive.pm b/lib/Intrusive.pm index cd46f9a..abd5593 100644 --- a/lib/Intrusive.pm +++ b/lib/Intrusive.pm @@ -72,6 +72,9 @@ sub _find_modules { my $WriteMakefile = sub { my %args = @_; $self->requires( $args{PREREQ_PM} || {} ); + my %br = %{ $args{TEST_REQUIRES} || {} }; + %br = (%br, %{ $args{BUILD_REQUIRES} }) if $args{BUILD_REQUIRES}; + $self->build_requires( \%br ); 1; }; local *main::WriteMakefile;