git: 70be34c9bb73 - main - devel/p5-Module-Installed-Tiny: Add p5-Module-Installed-Tiny 0.004

Po-Chuan Hsieh sunpoet at FreeBSD.org
Sun Aug 8 14:58:10 UTC 2021


The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=70be34c9bb73ea7c16247e4edef1a197e441e504

commit 70be34c9bb73ea7c16247e4edef1a197e441e504
Author:     Po-Chuan Hsieh <sunpoet at FreeBSD.org>
AuthorDate: 2021-08-08 14:32:13 +0000
Commit:     Po-Chuan Hsieh <sunpoet at FreeBSD.org>
CommitDate: 2021-08-08 14:53:54 +0000

    devel/p5-Module-Installed-Tiny: Add p5-Module-Installed-Tiny 0.004
    
    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.
    
    WWW: https://metacpan.org/dist/Module-Installed-Tiny
---
 devel/Makefile                           |  1 +
 devel/p5-Module-Installed-Tiny/Makefile  | 23 +++++++++++++++++++++++
 devel/p5-Module-Installed-Tiny/distinfo  |  3 +++
 devel/p5-Module-Installed-Tiny/pkg-descr | 12 ++++++++++++
 devel/p5-Module-Installed-Tiny/pkg-plist |  2 ++
 5 files changed, 41 insertions(+)

diff --git a/devel/Makefile b/devel/Makefile
index b6b5344e0568..be5ee8dc5676 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -2778,6 +2778,7 @@
     SUBDIR += p5-Module-Install-Template
     SUBDIR += p5-Module-Install-TestBase
     SUBDIR += p5-Module-Install-XSUtil
+    SUBDIR += p5-Module-Installed-Tiny
     SUBDIR += p5-Module-List
     SUBDIR += p5-Module-Load
     SUBDIR += p5-Module-Load-Conditional
diff --git a/devel/p5-Module-Installed-Tiny/Makefile b/devel/p5-Module-Installed-Tiny/Makefile
new file mode 100644
index 000000000000..e5fc0fa7447c
--- /dev/null
+++ b/devel/p5-Module-Installed-Tiny/Makefile
@@ -0,0 +1,23 @@
+# Created by: Po-Chuan Hsieh <sunpoet at FreeBSD.org>
+
+PORTNAME=	Module-Installed-Tiny
+PORTVERSION=	0.004
+CATEGORIES=	devel perl5
+MASTER_SITES=	CPAN
+PKGNAMEPREFIX=	p5-
+
+MAINTAINER=	sunpoet at FreeBSD.org
+COMMENT=	Check if a module is installed, with as little code as possible
+
+LICENSE=	ART10 GPLv1+
+LICENSE_COMB=	dual
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+TEST_DEPENDS=	p5-Test-Needs>=0:devel/p5-Test-Needs
+
+USES=		perl5
+USE_PERL5=	configure
+
+NO_ARCH=	yes
+
+.include <bsd.port.mk>
diff --git a/devel/p5-Module-Installed-Tiny/distinfo b/devel/p5-Module-Installed-Tiny/distinfo
new file mode 100644
index 000000000000..e4c409fc85a9
--- /dev/null
+++ b/devel/p5-Module-Installed-Tiny/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1628103012
+SHA256 (Module-Installed-Tiny-0.004.tar.gz) = 0f880fc3aea773084e786d92feeeebe5021320005cba728d9ec640035fd8acb3
+SIZE (Module-Installed-Tiny-0.004.tar.gz) = 17418
diff --git a/devel/p5-Module-Installed-Tiny/pkg-descr b/devel/p5-Module-Installed-Tiny/pkg-descr
new file mode 100644
index 000000000000..df49f0604395
--- /dev/null
+++ b/devel/p5-Module-Installed-Tiny/pkg-descr
@@ -0,0 +1,12 @@
+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.
+
+WWW: https://metacpan.org/dist/Module-Installed-Tiny
diff --git a/devel/p5-Module-Installed-Tiny/pkg-plist b/devel/p5-Module-Installed-Tiny/pkg-plist
new file mode 100644
index 000000000000..ff48628622d7
--- /dev/null
+++ b/devel/p5-Module-Installed-Tiny/pkg-plist
@@ -0,0 +1,2 @@
+%%SITE_PERL%%/Module/Installed/Tiny.pm
+%%PERL5_MAN3%%/Module::Installed::Tiny.3.gz


More information about the dev-commits-ports-main mailing list