From patchwork Tue Oct 18 01:38:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: EuAndreh X-Patchwork-Id: 43493 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 6476727BBED; Tue, 18 Oct 2022 02:39:49 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 0DED627BBE9 for ; Tue, 18 Oct 2022 02:39:49 +0100 (BST) Received: from localhost ([::1]:57774 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1okba8-0005pA-45 for patchwork@mira.cbaines.net; Mon, 17 Oct 2022 21:39:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46268) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okbZQ-0005ny-3W for guix-patches@gnu.org; Mon, 17 Oct 2022 21:39:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51514) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1okbZP-0007yM-MK for guix-patches@gnu.org; Mon, 17 Oct 2022 21:39:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1okbZP-0003jz-I1 for guix-patches@gnu.org; Mon, 17 Oct 2022 21:39:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58603] [PATCH 3/8] gnu: Add perl-readonly-xs. Resent-From: EuAndreh Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 18 Oct 2022 01:39:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58603 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58603@debbugs.gnu.org Cc: EuAndreh Received: via spool by 58603-submit@debbugs.gnu.org id=B58603.166605712414284 (code B ref 58603); Tue, 18 Oct 2022 01:39:03 +0000 Received: (at 58603) by debbugs.gnu.org; 18 Oct 2022 01:38:44 +0000 Received: from localhost ([127.0.0.1]:50576 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okbZ5-0003iK-Lx for submit@debbugs.gnu.org; Mon, 17 Oct 2022 21:38:44 -0400 Received: from box.euandre.org ([46.101.160.115]:51927) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okbZ3-0003hu-C3 for 58603@debbugs.gnu.org; Mon, 17 Oct 2022 21:38:41 -0400 Received: from authenticated-user (box.euandre.org [46.101.160.115]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by box.euandre.org (Postfix) with ESMTPSA id 2917FFC4B2; Mon, 17 Oct 2022 22:38:34 -0300 (-03) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=euandre.org; s=mail; t=1666057115; bh=RvG0qrwPaYLQm+a1OT1gQmvRyiqTkuYg+PePguzRBEQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MT8GX1xhyPCDLuQg/TLUUQyvrTlcMu9d0ZSEinUVflCAf38NDZ38PSr5BphMC8r67 NA5TIhlZNi4c3+2meyYcnJfNp6qeiIHagOkVId+xYC8TpdVebR3YmyEQcRbpmlDJ1d wY5v5e4UW/WHkcAuHKOWppuiefMloD96YraKZTYvDd8Fe2R6y94nM3eHVefG4/cIWR GECdiuHhieXdh9tTHknZYolsTTCkl2GVNm/u5DKM6ckr1ySxJfjPi/yJ7b//IPSkm9 sVKIHim6KW8+dEqA6jrwIqZhzQAbMV+gOkchVEjMq8IpUTk6favhcPcyEFc9mMHJnl G5yOv4IAcS+sA== Date: Mon, 17 Oct 2022 22:38:13 -0300 Message-Id: <20221018013818.12165-3-eu@euandre.org> In-Reply-To: <20221018013818.12165-1-eu@euandre.org> References: <20221018013818.12165-1-eu@euandre.org> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: EuAndreh X-ACL-Warn: , EuAndreh via Guix-patches X-Patchwork-Original-From: EuAndreh via Guix-patches via From: EuAndreh X-getmail-retrieved-from-mailbox: Patches * gnu/packages/perl.scm (perl-readonly-xs): New variable. --- gnu/packages/perl.scm | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm index 1146fecb6b..f5a8fad4d5 100644 --- a/gnu/packages/perl.scm +++ b/gnu/packages/perl.scm @@ -8854,6 +8854,38 @@ (define-public perl-readonly 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")