Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

Commit 3970ee3

Browse files
committed
when using PDL functionality, PDL needs to be 2.006 or greater
1 parent c4b1807 commit 3970ee3

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

META.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@
5656
"File::Temp" : "0",
5757
"IO::Handle" : "0",
5858
"IPC::Open3" : "0",
59-
"PDL" : "0",
6059
"Storable" : "0",
6160
"Test::Fatal" : "0",
6261
"Test::InDistDir" : "0",

lib/WebService/Plotly.pm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,8 @@ sub _makecall {
195195
my ( $json_args, $json_kwargs );
196196
{
197197
no warnings 'once';
198-
local *PDL::TO_JSON = sub { $_[0]->unpdl };
198+
local *PDL::TO_JSON = sub { $_[0]->unpdl }
199+
if PDL->VERSION >= 2.006;
199200
my $convert = sub { JSON->new->utf8->convert_blessed( 1 )->canonical( 1 )->encode( $_[0] ) };
200201
$json_args = $convert->( $args );
201202
$json_kwargs = $convert->( \%kwargs );

t/basic.t

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ sub run {
6363
}
6464

6565
SKIP: {
66-
skip "no PDL", 15 if !eval { require PDL };
66+
skip "no PDL", 15 if PDL->VERSION < 2.006;
6767
my $url = "https://plot.ly/~$user{un}/1";
6868
my $name = "plot from API (1)";
6969
my $box = {
@@ -86,7 +86,7 @@ sub run {
8686
}
8787

8888
SKIP: {
89-
skip "no PDL", 15 if !eval { require PDL };
89+
skip "no PDL", 15 if PDL->VERSION < 2.006;
9090
require PDL::Constants;
9191
require Storable;
9292
require PDL::IO::Storable;

0 commit comments

Comments
 (0)