From ca5df2cd4d91ab22fc72c8761115ad3d6f128700 Mon Sep 17 00:00:00 2001 From: Ed J Date: Tue, 6 Feb 2024 22:58:07 +0000 Subject: [PATCH] simplify storable error-check --- IO/Storable/storable.pd | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/IO/Storable/storable.pd b/IO/Storable/storable.pd index da2ec0e80..9acbbee8d 100644 --- a/IO/Storable/storable.pd +++ b/IO/Storable/storable.pd @@ -290,8 +290,7 @@ sub STORABLE_thaw { # return if $cloning; my $class = ref $pdl; if (defined $hashref) { - croak "serial data with hashref!" unless !defined $serial || - $serial eq ""; + croak "serial data with hashref!" unless ($serial//'') eq ""; @$pdl{keys %$hashref} = values %$hashref; } else { # all the magic is happening in pdlunpack