From 65856ec8118e52d99d5e460b1ffc6a5c2ff6b999 Mon Sep 17 00:00:00 2001 From: Marcin Kasperski Date: Mon, 19 Nov 2012 21:50:24 +0100 Subject: [PATCH] Attempts to install module on the system on which Bytes::Random::Secure was installed ended up with: Running make test PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/run.t .. 1/? # Failed test 'open a pwsafe3 database' # at t/run.t line 36. # Failed test 'read a pwsafe3 database and change a record (Undefined subroutine &Crypt::PWSafe3::random_bytes called at /home/marcink/.cpan/build/Crypt-PWSafe3-1.06-qScJdO/blib/lib/Crypt/PWSafe3.pm line 56. # )' # at t/run.t line 66. (and more such errors). --- lib/Crypt/PWSafe3.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/Crypt/PWSafe3.pm b/lib/Crypt/PWSafe3.pm index 5e60c83..7f09238 100644 --- a/lib/Crypt/PWSafe3.pm +++ b/lib/Crypt/PWSafe3.pm @@ -34,7 +34,10 @@ use Crypt::PWSafe3::SHA256; # install a wrapper closure around the # one we found. BEGIN { - eval { require Bytes::Random::Secure }; + eval { + require Bytes::Random::Secure; + Bytes::Random::Secure->import("random_bytes"); + }; if ($@) { # well, didn' work, use slow function eval { require Crypt::Random; };# qw( makerandom ); };