From 18683f727ca99b94eb516002f6be803a7fe82e8e Mon Sep 17 00:00:00 2001 From: Ed J Date: Tue, 24 Sep 2024 17:31:21 +0000 Subject: [PATCH] minimum version of P:G:G if installed to avoid gnuplot 6 breakage --- Makefile.PL | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Makefile.PL b/Makefile.PL index a809968..2564641 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -26,6 +26,15 @@ FOO my %prereq = ( 'PDL' => '2.089', # contour_polylines 'File::Temp' => 0, 'Time::HiRes' => 0); +my %min_version = ( + 'PDL::Graphics::Gnuplot' => '2.029', # Gnuplot 6 warnings fixes +); +for my $opt_dep (sort keys %min_version) { + (my $file = $opt_dep) =~ s#::#/#g; + next if !eval { require "$file.pm"; 1 }; # not installed, fine + next if eval { $opt_dep->VERSION($min_version{$opt_dep}); 1 }; + $prereq{$opt_dep} = $min_version{$opt_dep}; +} WriteMakefile( NAME => 'PDL::Graphics::Simple',