![](https://seccdn.libravatar.org/avatar/e2145bc5cf53dda95c308a3c75e8fef3.jpg?s=120&d=mm&r=g)
Hello community, here is the log from the commit of package perl-Hook-LexWrap for openSUSE:Factory checked in at 2015-04-15 16:25:32 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Hook-LexWrap (Old) and /work/SRC/openSUSE:Factory/.perl-Hook-LexWrap.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "perl-Hook-LexWrap" Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Hook-LexWrap/perl-Hook-LexWrap.changes 2011-09-23 12:37:28.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.perl-Hook-LexWrap.new/perl-Hook-LexWrap.changes 2015-04-15 16:25:34.000000000 +0200 @@ -1,0 +2,6 @@ +Tue Apr 14 20:21:00 UTC 2015 - coolo@suse.com + +- updated to 0.25 + see /usr/share/doc/packages/perl-Hook-LexWrap/Changes + +------------------------------------------------------------------- Old: ---- Hook-LexWrap-0.24.tar.gz New: ---- Hook-LexWrap-0.25.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Hook-LexWrap.spec ++++++ --- /var/tmp/diff_new_pack.ZnA6NZ/_old 2015-04-15 16:25:34.000000000 +0200 +++ /var/tmp/diff_new_pack.ZnA6NZ/_new 2015-04-15 16:25:34.000000000 +0200 @@ -1,7 +1,7 @@ # -# spec file for package perl-Hook-LexWrap (Version 0.24) +# spec file for package perl-Hook-LexWrap # -# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 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 @@ -15,63 +15,85 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -# norootforbuild - -%bcond_with pod Name: perl-Hook-LexWrap +Version: 0.25 +Release: 0 %define cpan_name Hook-LexWrap Summary: Lexically scoped subroutine wrappers -Version: 0.24 -Release: 2 -License: GPL-1.0+ or Artistic-1.0 +License: Artistic-1.0 or GPL-1.0+ Group: Development/Libraries/Perl Url: http://search.cpan.org/dist/Hook-LexWrap/ -Source: http://search.cpan.org/CPAN/authors/id/C/CH/CHORNY/Hook-LexWrap-0.24.tar.gz +Source: http://www.cpan.org/authors/id/E/ET/ETHER/%{cpan_name}-%{version}.tar.gz BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build -%{perl_requires} BuildRequires: perl -BuildRequires: perl(Module::Build) BuildRequires: perl-macros -%if %{with pod} -BuildRequires: perl(Test::Pod) >= 1.14 -%endif -BuildRequires: perl(Test::More) +BuildRequires: perl(Module::Build::Tiny) >= 0.039 +%{perl_requires} %description Hook::LexWrap allows you to install a pre- or post-wrapper (or both) around an existing subroutine. Unlike other modules that provide this capacity (e.g. Hook::PreAndPost and Hook::WrapSub), Hook::LexWrap implements -wrappers in such a way that the standard caller function works correctly +wrappers in such a way that the standard 'caller' function works correctly within the wrapped subroutine. -Authors: --------- - Damian Conway (damian@conway.org) +To install a prewrappers, you write: + + use Hook::LexWrap; + + wrap 'subroutine_name', pre => \&some_other_sub; + + #or: wrap *subroutine_name, pre => \&some_other_sub; + +The first argument to 'wrap' is a string containing the name of the +subroutine to be wrapped (or the typeglob containing it, or a reference to +it). The subroutine name may be qualified, and the subroutine must already +be defined. The second argument indicates the type of wrapper being applied +and must be either ''pre'' or ''post''. The third argument must be a +reference to a subroutine that implements the wrapper. + +To install a post-wrapper, you write: + + wrap 'subroutine_name', post => \&yet_another_sub; + + #or: wrap *subroutine_name, post => \&yet_another_sub; + +To install both at once: + + wrap 'subroutine_name', + pre => \&some_other_sub, + post => \&yet_another_sub; + +or: + + wrap *subroutine_name, + post => \&yet_another_sub, # order in which wrappers are + pre => \&some_other_sub; # specified doesn't matter + +Once they are installed, the pre- and post-wrappers will be called before +and after the subroutine itself, and will be passed the same argument list. + +The pre- and post-wrappers and the original subroutine also all see the +same (correct!) values from 'caller' and 'wantarray'. %prep %setup -q -n %{cpan_name}-%{version} -### rpmlint: -# wrong-file-end-of-line-encoding -%{__perl} -pi -e 's|\r\n|\n|' demo/*.pl Changes README %build -%{__perl} Build.PL installdirs=vendor -./Build build flags=%{?_smp_mflags} +%{__perl} Build.PL --installdirs=vendor +./Build build --flags=%{?_smp_mflags} %check ./Build test %install -./Build install destdir=$RPM_BUILD_ROOT create_packlist=0 +./Build install --destdir=%{buildroot} --create_packlist=0 %perl_gen_filelist -%clean -%{__rm} -rf $RPM_BUILD_ROOT - %files -f %{name}.files -%defattr(-,root,root,-) -%doc Changes demo README +%defattr(-,root,root,755) +%doc Changes CONTRIBUTING LICENSE README %changelog ++++++ Hook-LexWrap-0.24.tar.gz -> Hook-LexWrap-0.25.tar.gz ++++++ ++++ 4612 lines of diff (skipped)