Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion t/key_lifecycle.t
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use Crypt::OpenSSL::RSA;
Crypt::OpenSSL::Random::random_seed("OpenSSL needs at least 32 bytes.");
Crypt::OpenSSL::RSA->import_random_seed();

my $HAS_BIGNUM = $INC{'Crypt/OpenSSL/Bignum.pm'} ? 1 : 0;
my $HAS_BIGNUM = eval { require Crypt::OpenSSL::Bignum; 1 } ? 1 : 0;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. Require takes a path.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

require is perfectly legal as a bareword like:

require Crypt::OpenSSL::Bignum

BUT this is not legal of course we're not doing that here.

my $module = "Crypt::OpenSSL::Bignum";
require $module; # Illegal


# skip() reports skipped tests which count toward total, so plan must
# always include them regardless of whether Bignum is available.
Expand Down
Loading