BSD Ports

devel/p5-Module-Installed-Tiny 0.011 DragonFly

Check if a module is installed, with as little code as possible

System
DragonFly
Repository
DPorts
Maintainer
[email protected] (as in FreeBSD)
License
ART10, GPLv1+
Categories
devel, perl5
Package size
15.2 KiB, 54.3 KiB installed

Description

To check if a module is installed (available), generally the simplest way is to try to require() it. However, this actually loads the module. There are some cases where this is not desirable: 1) we have to check a lot of modules (actually loading the modules will take a lot of CPU time and memory; 2) some of the modules conflict with one another and cannot all be loaded; 3) the module is OS specific and might not load under another OS; 4) we simply do not want to execute the module, for security or other reasons.

Module::Installed::Tiny provides a routine module_installed() which works like Perl's require but does not actually load the module.

In the other systems

SystemPortVersion
DragonFlydevel/p5-Module-Installed-Tiny0.011
FreeBSDdevel/p5-Module-Installed-Tiny0.011
HardenedBSDdevel/p5-Module-Installed-Tiny0.011
GhostBSDdevel/p5-Module-Installed-Tiny0.011

Install

Binary package:

pkg install p5-Module-Installed-Tiny

From DPorts:

cd /usr/dports/devel/p5-Module-Installed-Tiny && make install clean

Dependencies

Run dependencies 1
Required by 1