[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
09/15: gnu: Add perl-readonly-xs.
From: |
guix-commits |
Subject: |
09/15: gnu: Add perl-readonly-xs. |
Date: |
Tue, 18 Oct 2022 06:14:56 -0400 (EDT) |
cbaines pushed a commit to branch master
in repository guix.
commit b91a5667c61bd9c55e70dd86418ccf0a5040736a
Author: EuAndreh <eu@euandre.org>
AuthorDate: Mon Oct 17 22:38:13 2022 -0300
gnu: Add perl-readonly-xs.
* gnu/packages/perl.scm (perl-readonly-xs): New variable.
Signed-off-by: Christopher Baines <mail@cbaines.net>
---
gnu/packages/perl.scm | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index c98d3429ed..15138d453f 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -8854,6 +8854,38 @@ can also be useful as a development and debugging tool
for catching updates to
variables that should not be changed.")
(license (package-license perl))))
+(define-public perl-readonly-xs
+ (package
+ (name "perl-readonly-xs")
+ (version "1.05")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "mirror://cpan/authors/id/R/RO/ROODE/Readonly-XS-" version
+ ".tar.gz"))
+ (sha256
+ (base32
+ "03gz7yp194fwah2bc36ww04hgw1qx8p6y68vvnywircrablc9rca"))))
+ (build-system perl-build-system)
+ (propagated-inputs (list perl-readonly))
+ (home-page "https://metacpan.org/release/Readonly-XS")
+ (synopsis "Companion module for @code{Readonly.pm}, to speed up read-only
+scalar variables")
+ (description
+ "The @code{Readonly} module is an effective way to create non-modifiable
+variables. However, it's relatively slow.
+
+The reason it's slow is that is implements the read-only-ness of variables via
+tied objects. This mechanism is inherently slow. Perl simply has to do a lot
+of work under the hood to make tied variables work.
+
+This module corrects the speed problem, at least with respect to scalar
+variables. When @code{Readonly::XS} is installed, @code{Readonly} uses it to
+access the internals of scalar variables. Instead of creating a scalar
variable
+object and tying it, @code{Readonly} simply flips the @code{SvREADONLY} bit in
+the scalar's @code{FLAGS} structure.")
+ (license license:perl-license)))
+
(define-public perl-ref-util-xs
(package
(name "perl-ref-util-xs")
- 05/15: gnu: Add perl-commonmark., (continued)
- 05/15: gnu: Add perl-commonmark., guix-commits, 2022/10/18
- 11/15: gnu: Add perl-ppix-regexp., guix-commits, 2022/10/18
- 04/15: gnu: Add skk-jisyo., guix-commits, 2022/10/18
- 06/15: gnu: Add perl-regexp-grammars., guix-commits, 2022/10/18
- 07/15: gnu: Add perl-config-tiny., guix-commits, 2022/10/18
- 01/15: gnu: textpieces: Reorder dependencies and fix description., guix-commits, 2022/10/18
- 02/15: services: nginx: Use nginx-action over inline gexp., guix-commits, 2022/10/18
- 08/15: gnu: Add perl-pod-spell., guix-commits, 2022/10/18
- 13/15: gnu: Add perl-ppix-utilities., guix-commits, 2022/10/18
- 03/15: services: nginx: Improve reload action documentation., guix-commits, 2022/10/18
- 09/15: gnu: Add perl-readonly-xs.,
guix-commits <=