Module:...CheckLib(3)
okay so bestie, this is the Module:...CheckLib(3) page from the User Contributed Perl Documentation β and it's literally the manual for checking that a library is available. Let's go β¨
π NAME π
Module::Install::CheckLib β a Module::Install extension to check that a library is available. slay.
β¨ SYNOPSIS β¨
Like, inside your Makefile.PL:
# In Makefile.PL
use inc::Module::Install;
checklibs lib => 'jpeg', header => 'jpeglib.h';
And the vibe is: the Makefile.PL will exit unless library or header is found. π
π¦ DESCRIPTION π¦
Module::Install::CheckLib is a Module::Install extension that integrates Devel::CheckLib so that CPAN authors may stipulate which particular C library and its headers they want available and to exit Makefile.PL gracefully if they aren't.
The author specifies which C libraries, etc, they want available. Devel::CheckLib is copied to the inc/ directory along with the Module::Install files.
On the module user side, the bundled inc/ Devel::CheckLib determines whether the current environment is supported or not and will exit accordingly.
π COMMANDS π
This plugin adds the following Module::Install command:
π
checklibs
Requires a list of parameters. These are passed directly to Devel::CheckLib check_lib_or_exit function. Please consult the documentation for Devel::CheckLib for more details on what these parameters are.
This is generally the function one should use in Makefile.PL, as it exits gracefully and plays nice with CPAN Testers. iconic behavior.
π assertlibs
The same as checklibs but uses Devel::CheckLib assert_lib instead. assert_lib dies instead of exiting gracefully. It is provided for completeness, please use checklibs.
gentle reminder: the docs literally say please use checklibs.
By default, the module skips calls to Devel::CheckLibs subroutines when called from the author side. The extra option run_checks_as_author can be given to both checklibs and assertlibs to enable those checks even in author mode.
Example:
checklibs lib => libfoo, run_checks_as_author => 1;
π AUTHOR π
Chris "BinGOs" Williams
Based on use-devel-checklib by David Cantrell
π LICENSE π
Copyright Β© Chris Williams and David Cantrell
This module may be used, modified, and distributed under the same terms as Perl itself. Please see the license that came with your Perl distribution for details.
π SEE ALSO π
Module::InstallDevel::CheckLib
okay that's the whole page, bestie β footer cuteness: perl v5.32.1, dated 2021-12-16, manual name User Contributed Perl Documentation. mwah ππ«Ά
π¦ where this page comes from
- epel 9: perl-Module-Install-CheckLib 0.14-1.el9 Β· GPL+ or Artistic
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms