diff options
author | sunpoet <sunpoet@FreeBSD.org> | 2013-11-28 04:45:06 +0800 |
---|---|---|
committer | sunpoet <sunpoet@FreeBSD.org> | 2013-11-28 04:45:06 +0800 |
commit | 03adde894fb43cd326ba86d8258655c1fc598086 (patch) | |
tree | 5b6025648deb3f0221d615678690118768caacf5 /devel | |
parent | dbe3484e9cc66175988517ea512262477f2ba52b (diff) | |
download | freebsd-ports-gnome-03adde894fb43cd326ba86d8258655c1fc598086.tar.gz freebsd-ports-gnome-03adde894fb43cd326ba86d8258655c1fc598086.tar.zst freebsd-ports-gnome-03adde894fb43cd326ba86d8258655c1fc598086.zip |
- 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/
Diffstat (limited to 'devel')
-rw-r--r-- | devel/Makefile | 1 | ||||
-rw-r--r-- | devel/p5-Readonly-XS/Makefile | 22 | ||||
-rw-r--r-- | devel/p5-Readonly-XS/distinfo | 2 | ||||
-rw-r--r-- | devel/p5-Readonly-XS/pkg-descr | 19 | ||||
-rw-r--r-- | devel/p5-Readonly-XS/pkg-plist | 8 |
5 files changed, 52 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile index 189fee9ba51c..fe9259681717 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -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 diff --git a/devel/p5-Readonly-XS/Makefile b/devel/p5-Readonly-XS/Makefile new file mode 100644 index 000000000000..35e6d77cdb46 --- /dev/null +++ b/devel/p5-Readonly-XS/Makefile @@ -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> diff --git a/devel/p5-Readonly-XS/distinfo b/devel/p5-Readonly-XS/distinfo new file mode 100644 index 000000000000..6850e3ed50c8 --- /dev/null +++ b/devel/p5-Readonly-XS/distinfo @@ -0,0 +1,2 @@ +SHA256 (Readonly-XS-1.05.tar.gz) = 8ae5c4e85299e5c8bddd1b196f2eea38f00709e0dc0cb60454dc9114ae3fff0d +SIZE (Readonly-XS-1.05.tar.gz) = 8849 diff --git a/devel/p5-Readonly-XS/pkg-descr b/devel/p5-Readonly-XS/pkg-descr new file mode 100644 index 000000000000..b7fc386233b9 --- /dev/null +++ b/devel/p5-Readonly-XS/pkg-descr @@ -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/ diff --git a/devel/p5-Readonly-XS/pkg-plist b/devel/p5-Readonly-XS/pkg-plist new file mode 100644 index 000000000000..25831651945d --- /dev/null +++ b/devel/p5-Readonly-XS/pkg-plist @@ -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 |