aboutsummaryrefslogtreecommitdiffstats
path: root/devel/p5-File-Random
diff options
context:
space:
mode:
authorerwin <erwin@FreeBSD.org>2005-07-22 19:04:36 +0800
committererwin <erwin@FreeBSD.org>2005-07-22 19:04:36 +0800
commit05b1a53ffcb4a7aadac944a54b757a052aab3510 (patch)
treede29d866f03151e63641d41a1f0df2056624f503 /devel/p5-File-Random
parente838b2709ae40f1cb2d2950fe759f4772f9c2c01 (diff)
downloadfreebsd-ports-gnome-05b1a53ffcb4a7aadac944a54b757a052aab3510.tar.gz
freebsd-ports-gnome-05b1a53ffcb4a7aadac944a54b757a052aab3510.tar.zst
freebsd-ports-gnome-05b1a53ffcb4a7aadac944a54b757a052aab3510.zip
Add p5-File-Random 0.17, perl module for random selecting of a file.
PR: ports/82864 Submitted by: Aaron Dalton <aaron@daltons.ca>
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