ports/100691: [NEW PORT] devel/p5-threads: Perl interpreter-based threads
Gea-Suan Lin
gslin at gslin.org
Fri Jul 21 20:50:21 UTC 2006
>Number: 100691
>Category: ports
>Synopsis: [NEW PORT] devel/p5-threads: Perl interpreter-based threads
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Fri Jul 21 20:50:14 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: Gea-Suan Lin
>Release: FreeBSD 6.1-RELEASE i386
>Organization:
>Environment:
System: FreeBSD netnews.NCTU.edu.tw 6.1-RELEASE FreeBSD 6.1-RELEASE #0: Sat May 13 03:43:48 CST 2006
>Description:
Perl 5.6 introduced something called interpreter threads. Interpreter
threads are different from 5005threads (the thread model of Perl 5.005)
by creating a new Perl interpreter per thread, and not sharing any
data or state between threads by default.
Prior to Perl 5.8, this has only been available to people embedding
Perl, and for emulating fork() on Windows.
The threads API is loosely based on the old Thread.pm API. It is very
important to note that variables are not shared between threads, all
variables are by default thread local. To use shared variables one
must use threads::shared.
It is also important to note that you must enable threads by doing use
threads as early as possible in the script itself, and that it is not
possible to enable threading inside an eval "", do, require, or use.
In particular, if you are intending to share variables with
threads::shared, you must use threads before you use threads::shared.
(threads will emit a warning if you do it the other way around.)
WWW: http://search.cpan.org/dist/threads/
Generated with FreeBSD Port Tools 0.77
>How-To-Repeat:
>Fix:
--- p5-threads-1.37.shar begins here ---
# This is a shell archive. Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file". Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
# p5-threads
# p5-threads/pkg-descr
# p5-threads/Makefile
# p5-threads/pkg-plist
# p5-threads/distinfo
# p5-threads/files
# p5-threads/files/patch-Makefile.PL
#
echo c - p5-threads
mkdir -p p5-threads > /dev/null 2>&1
echo x - p5-threads/pkg-descr
sed 's/^X//' >p5-threads/pkg-descr << 'END-of-p5-threads/pkg-descr'
XPerl 5.6 introduced something called interpreter threads. Interpreter
Xthreads are different from 5005threads (the thread model of Perl 5.005)
Xby creating a new Perl interpreter per thread, and not sharing any
Xdata or state between threads by default.
X
XPrior to Perl 5.8, this has only been available to people embedding
XPerl, and for emulating fork() on Windows.
X
XThe threads API is loosely based on the old Thread.pm API. It is very
Ximportant to note that variables are not shared between threads, all
Xvariables are by default thread local. To use shared variables one
Xmust use threads::shared.
X
XIt is also important to note that you must enable threads by doing use
Xthreads as early as possible in the script itself, and that it is not
Xpossible to enable threading inside an eval "", do, require, or use.
XIn particular, if you are intending to share variables with
Xthreads::shared, you must use threads before you use threads::shared.
X(threads will emit a warning if you do it the other way around.)
X
XWWW: http://search.cpan.org/dist/threads/
END-of-p5-threads/pkg-descr
echo x - p5-threads/Makefile
sed 's/^X//' >p5-threads/Makefile << 'END-of-p5-threads/Makefile'
X# New ports collection makefile for: p5-threads
X# Date created: 2006-07-22
X# Whom: Gea-Suan Lin <gslin at gslin.org>
X#
X# $FreeBSD$
X#
X
XPORTNAME= threads
XPORTVERSION= 1.37
XCATEGORIES= devel perl5
XMASTER_SITES= ${MASTER_SITE_PERL_CPAN}
XMASTER_SITE_SUBDIR= ../../authors/id/J/JD/JDHEDDEN
XPKGNAMEPREFIX= p5-
X
XMAINTAINER= gslin at gslin.org
XCOMMENT= Perl interpreter-based threads
X
XPERL_CONFIGURE= yes
X
XMAN3= threads.3
X
X.include <bsd.port.pre.mk>
X
X.if ${PERL_LEVEL} < 500600
XIGNORE= requires perl 5.6.0 or later. Install lang/perl5.8 then try again
X.endif
X
X.include <bsd.port.post.mk>
END-of-p5-threads/Makefile
echo x - p5-threads/pkg-plist
sed 's/^X//' >p5-threads/pkg-plist << 'END-of-p5-threads/pkg-plist'
X at comment $FreeBSD$
X%%SITE_PERL%%/%%PERL_ARCH%%/auto/threads/.packlist
X%%SITE_PERL%%/%%PERL_ARCH%%/auto/threads/threads.bs
X%%SITE_PERL%%/%%PERL_ARCH%%/auto/threads/threads.so
X%%SITE_PERL%%/%%PERL_ARCH%%/threads.pm
X at dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%/auto/threads
END-of-p5-threads/pkg-plist
echo x - p5-threads/distinfo
sed 's/^X//' >p5-threads/distinfo << 'END-of-p5-threads/distinfo'
XMD5 (threads-1.37.tar.gz) = 0263111f57779bfbcaa554233d53d222
XSHA256 (threads-1.37.tar.gz) = 0a6c7d204ef19dc22cd8ef9e97cbb669fbf93beba0c325c00ea395c7259f4c62
XSIZE (threads-1.37.tar.gz) = 74001
END-of-p5-threads/distinfo
echo c - p5-threads/files
mkdir -p p5-threads/files > /dev/null 2>&1
echo x - p5-threads/files/patch-Makefile.PL
sed 's/^X//' >p5-threads/files/patch-Makefile.PL << 'END-of-p5-threads/files/patch-Makefile.PL'
X--- Makefile.PL.orig Sat Jul 22 04:37:17 2006
X+++ Makefile.PL Sat Jul 22 04:37:29 2006
X@@ -1,6 +1,5 @@
X # Module makefile for threads (using ExtUtils::MakeMaker)
X
X-require 5.008;
X
X use strict;
X use warnings;
END-of-p5-threads/files/patch-Makefile.PL
exit
--- p5-threads-1.37.shar ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list