# # spec file for package perl-Sub-Uplevel # # Copyright (c) 2013 SUSE LINUX Products 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/ # # decimal versioning as used by perl %define d_ver 0.24 # decimal dotted versioning as used by rpm %if 0%{?suse_version} > 1010 %define dd_ver %(perl -e "print version->new(%{d_ver})->normal" | sed "s/v//") %else %define dd_ver 0.240.0 %endif Name: perl-Sub-Uplevel Version: %{dd_ver} Release: 33.15 %define cpan_name Sub-Uplevel Summary: Apparently run a function in a higher stack frame License: GPL-1.0+ or Artistic-1.0 Group: Development/Libraries/Perl Url: http://search.cpan.org/dist/Sub-Uplevel/ Source: http://search.cpan.org/CPAN/authors/id/D/DA/DAGOLDEN/Sub-Uplevel-%{d_ver}.tar.gz BuildRequires: perl BuildRequires: perl-macros BuildRequires: perl(Carp) BuildRequires: perl(Module::Build) BuildRequires: perl(Test::More) >= 0.47 BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch %{perl_requires} %description Like Tcl's uplevel() function, but not quite so dangerous. The idea is just to fool caller(). All the really naughty bits of Tcl's uplevel() are avoided. %prep %setup -q -n %{cpan_name}-%{d_ver} %build %check make test %install perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags} -Wall" make %{?_smp_mflags} %perl_make_install %perl_process_packlist %perl_gen_filelist %clean rm -rf %{buildroot} %files -f %{name}.files %defattr(-,root,root,-) %doc Changes examples LICENSE README xt %changelog * Mon Apr 15 2013 idonmez@suse.com - Add Source URL, see https://en.opensuse.org/SourceUrls * Wed Feb 22 2012 vcizek@suse.com - update to 0.24 - fixed: additional test regex fixed - fixed: Perl 5.15 series Carp changes output format of messages (adds a period). This fixes the test regular expressions. [Andreas Koenig] - added: the $Sub::Uplevel::CHECK_FRAMES global constant to enable the frame depth checking and compile it out if not needed. [Adam Kennedy] * Fri Nov 18 2011 coolo@suse.com - use original .tar.gz * Tue Nov 30 2010 coolo@novell.com - switch to perl_requires macro * Wed Aug 11 2010 chris@computersalat.de - update to 0.22 - meta: added repository to metadata [Alexandr Ciornii] - 0.21_01 Sat Nov 29 15:24:49 EST 2008 - added: the ":aggressive" tag may be used to force reloading of Exporter, which often binds caller() prior to Sub::Uplevel's global override - recreated by cpanspec 1.78 o change to Build.PL - fix version mismatch o http://www.dagolden.com/index.php/369/version-numbers-should-be-boring/ perl modules normaly use "decimal versioning", but for rpm we need "decimal dotted versioning", hence the decimal 0.22 has to be normalized to decimal dotted 0.220.0 perl -e "print version->new(0.22)->normal" | sed "s/v//" o without doing this (latest) 0.22 < 0.2002 (previous) normalized: 0.220.0 > 0.200.200 - noarch pkg * Sun Dec 20 2009 jengelh@medozas.de - enable parallel build * Sat Jul 25 2009 chris@computersalat.de - spec mods * removed ^---------- * removed ^#--------- * Wed Jul 1 2009 chris@computersalat.de - added perl-macros o autogen filelist with perl_gen_filelist - spec mods o added header o fixed deps * Fri Sep 12 2008 anicka@suse.cz - update to 0.2002 * changed: removed Exporter dependency * test fix: fixed strange t/07_uplevel_too_high.t fail on Win32 * Wed Sep 10 2008 anicka@suse.cz - update to 0.2001 * test fix: changed prior override test to be more robust (SCHWERN) * changed: bumped perl requirement to 5.006 and stopped using vars (fixes a test bug under Test::More > 0.80) * fixed: load Carp only as needed (fixes problem on 5.005) * added: uplevel will warn if uplevel request is more than the call stack depth * Mon Feb 25 2008 anicka@suse.cz - update to 0.1901 * hides the "DB" package from indexers (DB used to support @DB::args) * bug fix: replacement caller() correctly sets @DB::args if calling package is DB * repackaging: custom Build.PL, moved all author tests to xt/, added LICENSE and INSTALL files * Thu Nov 1 2007 anicka@suse.cz - update to 0.18 * removed 5.006-specific language and tested on prerelease 5.00505 * Mon Oct 8 2007 anicka@suse.cz - update to 0.16 * Won't override any existing CORE::GLOBAL::caller when loaded * Localize global caller() override to the scope of the uplevel() call so it can play nicer with things like Contextual::Return and Hook::LexWrap that also override caller() * Thu Jun 14 2007 anicka@suse.cz - package created (version 0.14)