From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: [PATCH 02/29] gnu: Add perl-autovivification. Date: Wed, 23 Nov 2016 22:34:55 +0100 Message-ID: <20161123213522.2923-3-rekado@elephly.net> References: <20161123213522.2923-1-rekado@elephly.net> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44571) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c9fCo-0004Oo-LT for guix-devel@gnu.org; Wed, 23 Nov 2016 16:35:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c9fCn-0004vR-Jd for guix-devel@gnu.org; Wed, 23 Nov 2016 16:35:50 -0500 Received: from sender163-mail.zoho.com ([74.201.84.163]:21482) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c9fCn-0004uF-Ba for guix-devel@gnu.org; Wed, 23 Nov 2016 16:35:49 -0500 In-Reply-To: <20161123213522.2923-1-rekado@elephly.net> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org * gnu/packages/perl.scm (perl-autovivification): New variable. --- gnu/packages/perl.scm | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm index e9f3dca..92d973b 100644 --- a/gnu/packages/perl.scm +++ b/gnu/packages/perl.scm @@ -266,6 +266,33 @@ manipulate, read, and write Zip archive files.") list manipulation routines.") (license (package-license perl)))) +(define-public perl-autovivification + (package + (name "perl-autovivification") + (version "0.16") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/V/VP/VPIT/" + "autovivification-" version ".tar.gz")) + (sha256 + (base32 + "1422kw9fknv7rbjkgdfflg1q3mb69d3yryszp38dn0bgzkqhwkc1")))) + (build-system perl-build-system) + (home-page "http://search.cpan.org/dist/autovivification") + (synopsis "Lexically disable autovivification") + (description "When an undefined variable is dereferenced, it gets silently +upgraded to an array or hash reference (depending of the type of the +dereferencing). This behaviour is called autovivification and usually does +what you mean but it may be unnatural or surprising because your variables get +populated behind your back. This is especially true when several levels of +dereferencing are involved, in which case all levels are vivified up to the +last, or when it happens in intuitively read-only constructs like +@code{exists}. The pragma provided by this package lets you disable +autovivification for some constructs and optionally throws a warning or an +error when it would have happened.") + (license (package-license perl)))) + (define-public perl-base (package (name "perl-base") -- 2.10.2