From: Charles McGarvey Date: Fri, 22 Apr 2022 04:38:12 +0000 (-0600) Subject: Fix compatibility with older perls X-Git-Tag: v0.800~19 X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fp5-File-KDBX;a=commitdiff_plain;h=8a37f035ef35682b764c34e7b3c61ce03318b1c7 Fix compatibility with older perls --- diff --git a/lib/File/KDBX/KDF/AES.pm b/lib/File/KDBX/KDF/AES.pm index 161c086..548f862 100644 --- a/lib/File/KDBX/KDF/AES.pm +++ b/lib/File/KDBX/KDF/AES.pm @@ -19,8 +19,8 @@ our $VERSION = '999.999'; # VERSION my $FORK_OPTIMIZATION_THRESHOLD = 100_000; BEGIN { - my $use_fork = $ENV{NO_FORK} || !can_fork ? FALSE : TRUE; - *_USE_FORK = sub() { $use_fork }; + my $use_fork = $ENV{NO_FORK} || !can_fork; + *_USE_FORK = $use_fork ? \&TRUE : \&FALSE; } sub init {