- Add p5-true 0.18
Perl's require builtin (and its use wrapper) requires the files it loads to return a true value. This is usually accomplished by placing a single 1; statement at the end of included scripts or modules. It's not onerous to add but it's a speed bump on the Perl novice's road to enlightenment. In addition, it appears to be a non-sequitur to the uninitiated, leading some to attempt to mitigate its appearance with a comment: 1; # keep require happy or: 1; # Do not remove this line or even: 1; # Must end with this, because Perl is bogus. This module packages this "return true" behaviour so that it need not be written explicitly. It can be used directly, but it is intended to be invoked from the import method of a Modern::Perl-style module that enables modern Perl features and conveniences and cleans up legacy Perl warts. WWW: http://search.cpan.org/dist/true/
This commit is contained in:
parent
42a521c1c4
commit
1ec74787a6
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=285318
5 changed files with 63 additions and 0 deletions
|
@ -2642,6 +2642,7 @@
|
|||
SUBDIR += p5-subversion
|
||||
SUBDIR += p5-threads
|
||||
SUBDIR += p5-threads-shared
|
||||
SUBDIR += p5-true
|
||||
SUBDIR += p5-uni-perl
|
||||
SUBDIR += p5-version
|
||||
SUBDIR += p65
|
||||
|
|
31
devel/p5-true/Makefile
Normal file
31
devel/p5-true/Makefile
Normal file
|
@ -0,0 +1,31 @@
|
|||
# New ports collection makefile for: p5-true
|
||||
# Date created: 2011-11-05
|
||||
# Whom: Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
PORTNAME= true
|
||||
PORTVERSION= 0.18
|
||||
CATEGORIES= devel perl5
|
||||
MASTER_SITES= CPAN
|
||||
MASTER_SITE_SUBDIR= CPAN:CHOCOLATE
|
||||
PKGNAMEPREFIX= p5-
|
||||
|
||||
MAINTAINER= sunpoet@FreeBSD.org
|
||||
COMMENT= Automatically return a true value when a file is required
|
||||
|
||||
BUILD_DEPENDS= p5-B-Hooks-OP-Annotation>=0.43:${PORTSDIR}/devel/p5-B-Hooks-OP-Annotation \
|
||||
p5-B-Hooks-OP-Check>=0.18:${PORTSDIR}/devel/p5-B-Hooks-OP-Check \
|
||||
p5-Devel-StackTrace>=1.27:${PORTSDIR}/devel/p5-Devel-StackTrace \
|
||||
p5-ExtUtils-Depends>=0.304:${PORTSDIR}/devel/p5-ExtUtils-Depends
|
||||
RUN_DEPENDS= p5-B-Hooks-OP-Annotation>=0.43:${PORTSDIR}/devel/p5-B-Hooks-OP-Annotation \
|
||||
p5-B-Hooks-OP-Check>=0.18:${PORTSDIR}/devel/p5-B-Hooks-OP-Check \
|
||||
p5-Devel-StackTrace>=1.27:${PORTSDIR}/devel/p5-Devel-StackTrace
|
||||
|
||||
PERL_CONFIGURE= yes
|
||||
|
||||
MAN3= true.3 \
|
||||
true::VERSION.3
|
||||
|
||||
.include <bsd.port.mk>
|
2
devel/p5-true/distinfo
Normal file
2
devel/p5-true/distinfo
Normal file
|
@ -0,0 +1,2 @@
|
|||
SHA256 (true-0.18.tar.gz) = ff3d041eb2a522ec6194d7a3888325e8a3ef2238ab51452f0b547696be0b4594
|
||||
SIZE (true-0.18.tar.gz) = 51382
|
22
devel/p5-true/pkg-descr
Normal file
22
devel/p5-true/pkg-descr
Normal file
|
@ -0,0 +1,22 @@
|
|||
Perl's require builtin (and its use wrapper) requires the files it loads to
|
||||
return a true value. This is usually accomplished by placing a single
|
||||
|
||||
1;
|
||||
|
||||
statement at the end of included scripts or modules. It's not onerous to add but
|
||||
it's a speed bump on the Perl novice's road to enlightenment. In addition, it
|
||||
appears to be a non-sequitur to the uninitiated, leading some to attempt to
|
||||
mitigate its appearance with a comment:
|
||||
|
||||
1; # keep require happy
|
||||
or:
|
||||
1; # Do not remove this line
|
||||
or even:
|
||||
1; # Must end with this, because Perl is bogus.
|
||||
|
||||
This module packages this "return true" behaviour so that it need not be written
|
||||
explicitly. It can be used directly, but it is intended to be invoked from the
|
||||
import method of a Modern::Perl-style module that enables modern Perl features
|
||||
and conveniences and cleans up legacy Perl warts.
|
||||
|
||||
WWW: http://search.cpan.org/dist/true/
|
7
devel/p5-true/pkg-plist
Normal file
7
devel/p5-true/pkg-plist
Normal file
|
@ -0,0 +1,7 @@
|
|||
%%SITE_PERL%%/%%PERL_ARCH%%/auto/true/.packlist
|
||||
%%SITE_PERL%%/%%PERL_ARCH%%/auto/true/true.bs
|
||||
%%SITE_PERL%%/%%PERL_ARCH%%/auto/true/true.so
|
||||
%%SITE_PERL%%/%%PERL_ARCH%%/true.pm
|
||||
%%SITE_PERL%%/%%PERL_ARCH%%/true/VERSION.pm
|
||||
@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/true
|
||||
@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/true
|
Loading…
Reference in a new issue