aboutsummaryrefslogtreecommitdiff
path: root/devel/p5-true/pkg-descr
diff options
context:
space:
mode:
authorSunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>2011-11-09 01:32:00 +0000
committerSunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>2011-11-09 01:32:00 +0000
commit1ec74787a69ea44701c0fe282a3945d9a042056c (patch)
treeb4070f03b451b52e589f08c8647f4da67cc1fdfd /devel/p5-true/pkg-descr
parent42a521c1c4b5310567aa694f79ae814b6fd764e7 (diff)
downloadports-1ec74787a69ea44701c0fe282a3945d9a042056c.tar.gz
ports-1ec74787a69ea44701c0fe282a3945d9a042056c.zip
Notes
Diffstat (limited to 'devel/p5-true/pkg-descr')
-rw-r--r--devel/p5-true/pkg-descr22
1 files changed, 22 insertions, 0 deletions
diff --git a/devel/p5-true/pkg-descr b/devel/p5-true/pkg-descr
new file mode 100644
index 000000000000..f590ada08ea8
--- /dev/null
+++ b/devel/p5-true/pkg-descr
@@ -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/