aboutsummaryrefslogtreecommitdiff
path: root/devel/p5-File-Random
diff options
context:
space:
mode:
authorErwin Lansing <erwin@FreeBSD.org>2005-07-22 11:04:36 +0000
committerErwin Lansing <erwin@FreeBSD.org>2005-07-22 11:04:36 +0000
commitfbf7bc486402b7c31248b5f10cceb9846e04f6e0 (patch)
tree14edb3b99e08749c63798f88c36b951b83d6afbf /devel/p5-File-Random
parentb72e28e525a4581d1298caea5f9f18d96b9fbdbd (diff)
downloadports-fbf7bc486402b7c31248b5f10cceb9846e04f6e0.tar.gz
ports-fbf7bc486402b7c31248b5f10cceb9846e04f6e0.zip
Notes
Diffstat (limited to 'devel/p5-File-Random')
-rw-r--r--devel/p5-File-Random/Makefile31
-rw-r--r--devel/p5-File-Random/distinfo2
-rw-r--r--devel/p5-File-Random/pkg-descr23
-rw-r--r--devel/p5-File-Random/pkg-plist5
4 files changed, 61 insertions, 0 deletions
diff --git a/devel/p5-File-Random/Makefile b/devel/p5-File-Random/Makefile
new file mode 100644
index 000000000000..c1076e354183
--- /dev/null
+++ b/devel/p5-File-Random/Makefile
@@ -0,0 +1,31 @@
+# New ports collection makefile for: p5-File-Random
+# Date created: 01 July 2005
+# Whom: Aaron Dalton <aaron@daltons.ca>
+#
+# $FreeBSD$
+#
+
+PORTNAME= File-Random
+PORTVERSION= 0.17
+CATEGORIES= devel perl5
+MASTER_SITES= ${MASTER_SITE_PERL_CPAN}
+MASTER_SITE_SUBDIR= File
+PKGNAMEPREFIX= p5-
+
+MAINTAINER= aaron@daltons.ca
+COMMENT= Perl module for random selecting of a file
+
+BUILD_DEPENDS= ${SITE_PERL}/${PERL_ARCH}/Want.pm:${PORTSDIR}/devel/p5-Want
+RUN_DEPENDS= ${BUILD_DEPENDS}
+
+PERL_CONFIGURE= yes
+
+MAN3= File::Random.3
+
+.include <bsd.port.pre.mk>
+
+.if ${PERL_LEVEL} < 500600
+IGNORE= Perl 5.6 or newer required. Install lang/perl5 or lang/perl5.8 and try again.
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/devel/p5-File-Random/distinfo b/devel/p5-File-Random/distinfo
new file mode 100644
index 000000000000..0ed9df12b942
--- /dev/null
+++ b/devel/p5-File-Random/distinfo
@@ -0,0 +1,2 @@
+MD5 (File-Random-0.17.tar.gz) = 4138133bf7fb0a2b4400073a3f1cea1d
+SIZE (File-Random-0.17.tar.gz) = 12834
diff --git a/devel/p5-File-Random/pkg-descr b/devel/p5-File-Random/pkg-descr
new file mode 100644
index 000000000000..4d7fe2cf84a8
--- /dev/null
+++ b/devel/p5-File-Random/pkg-descr
@@ -0,0 +1,23 @@
+This module simplifies the routine job of selecting a random file. (As you
+can find at CGI scripts). It's done, because it's boring (and
+errorprone), always to write something like
+
+ my @files = (<*.*>);
+ my $randf = $files[rand @files];
+
+or
+
+ opendir DIR, " ... " or die " ... ";
+ my @files = grep {-f ...} (readdir DIR);
+ closedir DIR;
+ my $randf = $files[rand @files];
+
+It also becomes very boring and very dangerous to write randomly selection
+for subdirectory searching with special check-routines. The simple
+standard job of selecting a random line from a file is implemented, too.
+
+WWW: http://search.cpan.org/dist/File-Random/
+Author: Janek Schleicher <bigj@kamelfreund.de>
+
+- Aaron Dalton
+aaron@daltons.ca
diff --git a/devel/p5-File-Random/pkg-plist b/devel/p5-File-Random/pkg-plist
new file mode 100644
index 000000000000..51e969bf35b7
--- /dev/null
+++ b/devel/p5-File-Random/pkg-plist
@@ -0,0 +1,5 @@
+%%SITE_PERL%%/File/Random.pm
+%%SITE_PERL%%/%%PERL_ARCH%%/auto/File/Random/.packlist
+@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/File/Random
+@unexec rmdir %D/%%SITE_PERL%%/%%PERL_ARCH%%/auto/File 2>/dev/null || true
+@unexec rmdir %D/%%SITE_PERL%%/File 2>/dev/null || true