1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-07 06:40:06 +00:00

- Add p5-Readonly-XS 1.05

This module corrects the speed problem, at least with respect to scalar
variables. When Readonly::XS is installed, Readonly uses it to access the
internals of scalar variables. Instead of creating a scalar variable object and
tying it, Readonly simply flips the SvREADONLY bit in the scalar's FLAGS
structure.

Readonly arrays and hashes are not sped up by this, since the SvREADONLY flag
only works for scalars. Arrays and hashes always use the tie interface.

Programs that you write do not need to know whether Readonly::XS is installed or
not. They should just "use Readonly" and let Readonly worry about whether or not
it can use XS. If the Readonly::XS is present, Readonly will be faster. If not,
it won't. Either way, it will still work, and your code will not have to change.

Your program can check whether Readonly.pm is using XS or not by examining the
$Readonly::XSokay variable. It will be true if the XS module was found and is
being used. Please do not change this variable.

WWW: http://search.cpan.org/dist/Readonly-XS/
This commit is contained in:
Sunpoet Po-Chuan Hsieh 2013-11-27 20:45:06 +00:00
parent 8c09dc1258
commit 91160c383e
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=335059
5 changed files with 52 additions and 0 deletions

View File

@ -2585,6 +2585,7 @@
SUBDIR += p5-ReadLine-Perl
SUBDIR += p5-ReadLine-TTYtter
SUBDIR += p5-Readonly
SUBDIR += p5-Readonly-XS
SUBDIR += p5-Reflex
SUBDIR += p5-Regexp-Assemble
SUBDIR += p5-Regexp-Assemble-Compressed

View File

@ -0,0 +1,22 @@
# Created by: Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>
# $FreeBSD$
PORTNAME= Readonly-XS
PORTVERSION= 1.05
CATEGORIES= devel perl5
MASTER_SITES= CPAN
PKGNAMEPREFIX= p5-
MAINTAINER= sunpoet@FreeBSD.org
COMMENT= Companion module for Readonly.pm, to speed up read-only scalar variables
LICENSE= ART10 GPLv1
LICENSE_COMB= dual
BUILD_DEPENDS= p5-Readonly>=1.02:${PORTSDIR}/devel/p5-Readonly
RUN_DEPENDS:= ${BUILD_DEPENDS}
USE_PERL5= configure
USES= perl5
.include <bsd.port.mk>

View File

@ -0,0 +1,2 @@
SHA256 (Readonly-XS-1.05.tar.gz) = 8ae5c4e85299e5c8bddd1b196f2eea38f00709e0dc0cb60454dc9114ae3fff0d
SIZE (Readonly-XS-1.05.tar.gz) = 8849

View File

@ -0,0 +1,19 @@
This module corrects the speed problem, at least with respect to scalar
variables. When Readonly::XS is installed, Readonly uses it to access the
internals of scalar variables. Instead of creating a scalar variable object and
tying it, Readonly simply flips the SvREADONLY bit in the scalar's FLAGS
structure.
Readonly arrays and hashes are not sped up by this, since the SvREADONLY flag
only works for scalars. Arrays and hashes always use the tie interface.
Programs that you write do not need to know whether Readonly::XS is installed or
not. They should just "use Readonly" and let Readonly worry about whether or not
it can use XS. If the Readonly::XS is present, Readonly will be faster. If not,
it won't. Either way, it will still work, and your code will not have to change.
Your program can check whether Readonly.pm is using XS or not by examining the
$Readonly::XSokay variable. It will be true if the XS module was found and is
being used. Please do not change this variable.
WWW: http://search.cpan.org/dist/Readonly-XS/

View File

@ -0,0 +1,8 @@
%%SITE_PERL%%/%%PERL_ARCH%%/Readonly/XS.pm
%%SITE_PERL%%/%%PERL_ARCH%%/auto/Readonly/XS/.packlist
%%SITE_PERL%%/%%PERL_ARCH%%/auto/Readonly/XS/XS.bs
%%SITE_PERL%%/%%PERL_ARCH%%/auto/Readonly/XS/XS.so
%%PERL5_MAN3%%/Readonly::XS.3.gz
@dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%/auto/Readonly/XS
@dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%/auto/Readonly
@dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%/Readonly