Skip to content

Commit

Permalink
Merge pull request #99 from PDLPorters/98-split-check-version
Browse files Browse the repository at this point in the history
Split version checking from `use Alien::Gnuplot`
  • Loading branch information
mohawk2 committed Apr 12, 2024
2 parents fa11a24 + 0220b8e commit e11c9a1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
- Split version checking from `use Alien::Gnuplot` line for easier downstream
packaging. Fixes #98.

2.024 2023-03-30
- Add Alien::Gnuplot as a configure-time dependency. Fixes #92 - thanks @zmughal

Expand Down
2 changes: 1 addition & 1 deletion Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ WriteMakefile(
'Alien::Gnuplot' => 0,
},
PREREQ_PM => {
'Alien::Gnuplot' => 0,
'Alien::Gnuplot' => '1.031',
'PDL' => 0,
'PDL::Transform::Color' => 0,
'IPC::Run' => 0,
Expand Down
4 changes: 3 additions & 1 deletion lib/PDL/Graphics/Gnuplot.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2010,14 +2010,16 @@ use Time::HiRes qw(gettimeofday tv_interval);
use Safe::Isa;
use Carp;

use Alien::Gnuplot 4.4; # Ensure gnuplot exists and is recent, and get ancillary info about it.
use Alien::Gnuplot;
if($Alien::Gnuplot::VERSION < 1.031) {
# Have to check explicitly since we use the version hack to check the *gnuplot* version.
die "PDL::Graphics::Gnuplot requires Alien::Gnuplot version 1.031 or higher\n (v$Alien::Gnuplot::VERSION found). You can pull the latest from CPAN.\n";
}

our $gnuplot_dep_v = 4.006; # Versions below this are deprecated.
our $gnuplot_req_v = 4.004; # Versions below this are not supported.
# Ensure gnuplot exists and is recent, and get ancillary info about it.
Alien::Gnuplot->VERSION('4.4');

# Compile time config flags...
our $check_syntax = 0;
Expand Down

0 comments on commit e11c9a1

Please sign in to comment.