From 8a37f035ef35682b764c34e7b3c61ce03318b1c7 Mon Sep 17 00:00:00 2001 From: Charles McGarvey Date: Thu, 21 Apr 2022 22:38:12 -0600 Subject: [PATCH] Fix compatibility with older perls --- lib/File/KDBX/KDF/AES.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 { -- 2.45.2