Sync from SUSE:SLFO:Main perl-Eval-Closure revision 5556bc23ed0d1342b15e699a341a7e66

This commit is contained in:
Adrian Schröter 2024-05-03 18:10:15 +02:00
commit dd942196af
5 changed files with 214 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

BIN
Eval-Closure-0.14.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

23
cpanspec.yml Normal file
View File

@ -0,0 +1,23 @@
---
#description_paragraphs: 3
#no_testing: broken upstream
#sources:
# - source1
# - source2
#patches:
# foo.patch: -p1
# bar.patch:
#preamble: |-
# BuildRequires: gcc-c++
#post_prep: |-
# hunspell=`pkg-config --libs hunspell | sed -e 's,-l,,; s, *,,g'`
# sed -i -e "s,hunspell-X,$hunspell," t/00-prereq.t Makefile.PL
#post_install: |-
# sed on %{name}.files
#license: SUSE-NonFree
#skip_noarch: 1
#custom_build: |-
#./Build build flags=%{?_smp_mflags} --myflag
#custom_test: |-
#startserver && make test
#ignore_requires: Bizarre::Module

93
perl-Eval-Closure.changes Normal file
View File

@ -0,0 +1,93 @@
-------------------------------------------------------------------
Tue May 31 10:19:17 UTC 2016 - coolo@suse.com
- updated to 0.14
see /usr/share/doc/packages/perl-Eval-Closure/Changes
0.14 2016-05-29
- a couple minor optimizations (dolmen, #8)
-------------------------------------------------------------------
Wed May 13 12:28:09 UTC 2015 - coolo@suse.com
- updated to 0.13
see /usr/share/doc/packages/perl-Eval-Closure/Changes
0.13 2015-05-12
- one more fix for blead (eserte, jplesnik, #6)
-------------------------------------------------------------------
Tue Apr 14 18:17:21 UTC 2015 - coolo@suse.com
- updated to 0.12
see /usr/share/doc/packages/perl-Eval-Closure/Changes
0.12 2015-01-17
- fix tests under blead (sprout, #4)
-------------------------------------------------------------------
Wed Jul 31 14:12:15 UTC 2013 - coolo@suse.com
- updated to 0.11
- add "alias => 1" option for making closure variables actually alias the
closed over variables (so the variable referenced in the environment
hashref will actually be updated by changes made in the closure). (Toby
Inkster, #3)
-------------------------------------------------------------------
Sat Jul 27 11:58:36 UTC 2013 - coolo@suse.com
- updated to 0.10
- fix pod links
- support lexical subs on 5.18+
-------------------------------------------------------------------
Thu Mar 21 14:12:01 UTC 2013 - lars@linux-schulserver.de
- remove perl-Eval-Closure-old_Test-More.patch - handle the problem
with old distributions in %%prep now
-------------------------------------------------------------------
Tue May 29 14:39:41 UTC 2012 - coolo@suse.com
- updated to 0.08
- Remove a double layer of string eval that was introduced in 0.07 as an
intermediate step in figuring out the unique package thing - it's not
necessary with the final implementation, and just makes things slower
and hides errors.
- the given source is now evaled in a unique package for every
eval_closure call (it used to always be evaled in the Eval::Closure
package, which was especially buggy). this is to avoid issues where one
eval_closure modifies the global environment (by, say, importing a
function), which could mess up a later call. unfortunately, this means
that the memoization stuff no longer works, since it will result in
memoized results using the original package, which defeats the purpose.
i'm open to suggestions on how to safely reenable it though.
- clean up a few stray lexicals we were still closing over in the eval
-------------------------------------------------------------------
Fri Nov 18 14:54:38 UTC 2011 - coolo@suse.com
- update to 0.06
- The dumped source from setting $ENV{EVAL_CLOSURE_PRINT_SOURCE} didn't
show the captured variable creation properly. (Dave Rolsky)
-------------------------------------------------------------------
Sat Jun 4 18:30:04 UTC 2011 - lars@linux-schulserver.de
- fix build on distributions with old Test::More module
( perl-Eval-Closure-old_Test-More.patch )
-------------------------------------------------------------------
Wed May 4 10:55:03 UTC 2011 - coolo@opensuse.org
- updated to 0.05
- make sure Perl::Tidy doesn't look at @ARGV (rafl)
- stop using Memoize, it apparently doesn't work properly under mod_perl
in some situations (mateu)
-------------------------------------------------------------------
Sat Apr 16 00:41:51 CET 2011 - pascal.bleser@opensuse.org
- initial version (0.03)

72
perl-Eval-Closure.spec Normal file
View File

@ -0,0 +1,72 @@
#
# spec file for package perl-Eval-Closure
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: perl-Eval-Closure
Version: 0.14
Release: 0
%define cpan_name Eval-Closure
Summary: Safely and Cleanly Create Closures Via String Eval
License: Artistic-1.0 or GPL-1.0+
Group: Development/Libraries/Perl
Url: http://search.cpan.org/dist/Eval-Closure/
Source0: http://www.cpan.org/authors/id/D/DO/DOY/%{cpan_name}-%{version}.tar.gz
Source1: cpanspec.yml
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(Test::Fatal)
BuildRequires: perl(Test::More) >= 0.88
BuildRequires: perl(Test::Requires)
Recommends: perl(Devel::LexAlias) >= 0.05
Recommends: perl(Perl::Tidy)
%{perl_requires}
%description
String eval is often used for dynamic code generation. For instance,
'Moose' uses it heavily, to generate inlined versions of accessors and
constructors, which speeds code up at runtime by a significant amount.
String eval is not without its issues however - it's difficult to control
the scope it's used in (which determines which variables are in scope
inside the eval), and it's easy to miss compilation errors, since eval
catches them and sticks them in $@ instead.
This module attempts to solve these problems. It provides an 'eval_closure'
function, which evals a string in a clean environment, other than a fixed
list of specified variables. Compilation errors are rethrown automatically.
%prep
%setup -q -n %{cpan_name}-%{version}
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
%{__make} %{?_smp_mflags}
%check
%{__make} test
%install
%perl_make_install
%perl_process_packlist
%perl_gen_filelist
%files -f %{name}.files
%defattr(-,root,root,755)
%doc Changes LICENSE README
%changelog