-
-
11 Feb 2022 08:53:54 UTC
- Distribution: Crypt-OpenSSL-Guess
- Module version: 0.15
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues
- Testers (2188 / 0 / 0)
- Kwalitee
Bus factor: 1- 17.54% Coverage
- License: perl_5
- Perl: v5.8.1
- Activity
24 month- Tools
- Download (11.67KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
NAME
Crypt::OpenSSL::Guess - Guess OpenSSL include path
SYNOPSIS
use ExtUtils::MakeMaker; use Crypt::OpenSSL::Guess; WriteMakefile( # ... LIBS => [openssl_lib_paths() . ' -lssl -lcrypto'], INC => openssl_inc_paths(), # guess include path or get from $ENV{OPENSSL_PREFIX} );
DESCRIPTION
Crypt::OpenSSL::Guess provides helpers to guess OpenSSL include path on any platforms.
Often macOS's homebrew OpenSSL cause a problem on installation due to include path is not added. Some CPAN module provides to modify include path with configure-args, but Carton or Module::CPANfile is not supported to pass configure-args to each modules. Crypt::OpenSSL::* modules should use it on your Makefile.PL.
This module resolves the include path by Net::SSLeay's workaround. Original code is taken from
inc/Module/Install/PRIVATE/Net/SSLeay.pm
by Net::SSLeay.FUNCTIONS
- openssl_inc_paths()
-
This functions returns include paths in the format passed to CC. If OpenSSL could not find, then empty string is returned.
openssl_inc_paths(); # on macOS: "-I/usr/local/opt/openssl/include"
- openssl_lib_paths()
-
This functions returns library paths in the format passed to CC. If OpenSSL could not find, then empty string is returned.
openssl_lib_paths(); # on macOS: "-L/usr/local/opt/openssl/lib"
- find_openssl_prefix([$dir])
-
This function returns OpenSSL's prefix. If set
OPENSSL_PREFIX
environment variable, you can overwrite the return value.find_openssl_prefix(); # on macOS: "/usr/local/opt/openssl"
- find_openssl_exec($prefix)
-
This functions returns OpenSSL's executable path.
find_openssl_exec(); # on macOS: "/usr/local/opt/openssl/bin/openssl"
- ($major, $minor, $letter) = openssl_version()
-
This functions returns OpenSSL's version as major, minor, letter.
openssl_version(); # ("1.0", "2", "n")
SEE ALSO
LICENSE
Copyright (C) Takumi Akiyama.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
AUTHOR
Takumi Akiyama <t.akiym@gmail.com>
Module Install Instructions
To install Crypt::OpenSSL::Guess, copy and paste the appropriate command in to your terminal.
cpanm Crypt::OpenSSL::Guess
perl -MCPAN -e shell install Crypt::OpenSSL::Guess
For more information on module installation, please visit the detailed CPAN module installation guide.