import ports/devel/p5-Class-Load, ok landry@
"require EXPR" only accepts "Class/Name.pm" style module names, not "Class::Name". How frustrating! For that, we provide "load_class 'Class::Name'". It's often useful to test whether a module can be loaded, instead of throwing an error when it's not available. For that, we provide "try_load_class 'Class::Name'". Finally, sometimes we need to know whether a particular class has been loaded. Asking %INC is an option, but that will miss inner packages and any class for which the filename does not correspond to the package name. For that, we provide "is_class_loaded 'Class::Name'".
This commit is contained in:
parent
5496547d1a
commit
281848cde0
22
devel/p5-Class-Load/Makefile
Normal file
22
devel/p5-Class-Load/Makefile
Normal file
@ -0,0 +1,22 @@
|
||||
# $OpenBSD: Makefile,v 1.1.1.1 2012/04/08 21:02:10 sthen Exp $
|
||||
|
||||
COMMENT = a working 'require Class::Name' and more
|
||||
|
||||
MODULES = cpan
|
||||
DISTNAME = Class-Load-0.12
|
||||
CATEGORIES = devel
|
||||
|
||||
# same as perl
|
||||
PERMIT_PACKAGE_CDROM = Yes
|
||||
PERMIT_PACKAGE_FTP = Yes
|
||||
PERMIT_DISTFILES_CDROM =Yes
|
||||
PERMIT_DISTFILES_FTP = Yes
|
||||
|
||||
RUN_DEPENDS = devel/p5-Data-OptList \
|
||||
devel/p5-Module-Runtime \
|
||||
devel/p5-Package-Stash>=0.32 \
|
||||
devel/p5-Try-Tiny
|
||||
|
||||
REGRESS_DEPENDS = devel/p5-Test-Fatal
|
||||
|
||||
.include <bsd.port.mk>
|
5
devel/p5-Class-Load/distinfo
Normal file
5
devel/p5-Class-Load/distinfo
Normal file
@ -0,0 +1,5 @@
|
||||
MD5 (Class-Load-0.12.tar.gz) = 8buCL/tQm1+WsXI38xircA==
|
||||
RMD160 (Class-Load-0.12.tar.gz) = 2Rman1KuD5kGC26+U13XUY/OzFo=
|
||||
SHA1 (Class-Load-0.12.tar.gz) = AhpbgLvAm2QHa37e/Py1JgffHtU=
|
||||
SHA256 (Class-Load-0.12.tar.gz) = 2QwVdAYKtRBzFoSUFrJ7E1LsrHWmLRgmdcBWiz1EPGo=
|
||||
SIZE (Class-Load-0.12.tar.gz) = 18770
|
12
devel/p5-Class-Load/pkg/DESCR
Normal file
12
devel/p5-Class-Load/pkg/DESCR
Normal file
@ -0,0 +1,12 @@
|
||||
"require EXPR" only accepts "Class/Name.pm" style module names, not
|
||||
"Class::Name". How frustrating! For that, we provide "load_class
|
||||
'Class::Name'".
|
||||
|
||||
It's often useful to test whether a module can be loaded, instead of
|
||||
throwing an error when it's not available. For that, we provide
|
||||
"try_load_class 'Class::Name'".
|
||||
|
||||
Finally, sometimes we need to know whether a particular class has been
|
||||
loaded. Asking %INC is an option, but that will miss inner packages and
|
||||
any class for which the filename does not correspond to the package
|
||||
name. For that, we provide "is_class_loaded 'Class::Name'".
|
6
devel/p5-Class-Load/pkg/PLIST
Normal file
6
devel/p5-Class-Load/pkg/PLIST
Normal file
@ -0,0 +1,6 @@
|
||||
@comment $OpenBSD: PLIST,v 1.1.1.1 2012/04/08 21:02:10 sthen Exp $
|
||||
${P5SITE}/Class/
|
||||
${P5SITE}/Class/Load/
|
||||
${P5SITE}/Class/Load.pm
|
||||
${P5SITE}/Class/Load/PP.pm
|
||||
@man man/man3p/Class::Load.3p
|
Loading…
Reference in New Issue
Block a user