%define pkg_name MasonX-Interp-WithCallbacks %define pkg_version 1.15 %define rpm_pkg_version 1.15 %define rpm_pkg_release 1.n0i.7 Summary: Mason callback support via Params::CallbackRequest Name: perl-%{pkg_name} Version: %{rpm_pkg_version} %if "%{pkg_version}" == "%{rpm_pkg_version}" Release: %{rpm_pkg_release} %else Release: %{rpm_pkg_release}.%(echo %{pkg_version} | tr - _) %endif Group: Development/Libraries License: Artistic URL: http://search.cpan.org/dist/%{pkg_name}/ Source0: ftp://ftp.cpan.org/authors/id/D/DW/DWHEELER/%{pkg_name}-%{pkg_version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch Requires: perl(:MODULE_COMPAT_%(%{__perl} -le 'printf "%%vd", $^V')) Requires: perl(Class::Container) >= 0.09 Requires: perl(HTML::Mason) >= 1.23 Requires: perl(Params::CallbackRequest) >= 1.15 %{!?_without_test:BuildRequires: perl(Class::Container) >= 0.09} %{!?_without_test:BuildRequires: perl(HTML::Mason) >= 1.23} %{!?_without_test:BuildRequires: perl(Params::CallbackRequest) >= 1.15} %{!?_without_test:BuildRequires: perl(Test::Simple) >= 0.17} %description MasonX::Interp::WithCallbacks subclasses HTML::Mason::Interp in order to provide a Mason callback system built on Params::CallbackRequest. Callbacks may be either code references provided to the "new()" constructor, or methods defined in subclasses of Params::Callback. Callbacks are triggered either for every request or by specially named keys in the Mason request arguments, and all callbacks are executed at the beginning of a request, just before Mason creates and executes the request component stack. This module brings support for a sort of plugin architecture based on Params::CallbackRequest to Mason. Mason then executes code before executing any components. This approach allows you to carry out logical processing of data submitted from a form, to affect the contents of the Mason request arguments (and thus the %ARGS hash in components), and even to redirect or abort the request before Mason handles it. %prep %setup -n %{pkg_name}-%{pkg_version} find . -type f | xargs -r chmod 0644 %build PERL_MM_USE_DEFAULT=1 %{__perl} Makefile.PL INSTALLDIRS=vendor %{__make} %{!?_without_test:%{__make} test} %install %{__rm} -rf $RPM_BUILD_ROOT %{__make} pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT find $RPM_BUILD_ROOT -name .packlist -delete || : find $RPM_BUILD_ROOT -type f -name '*.bs' -a -empty -delete || : find $RPM_BUILD_ROOT -depth -type d -a -empty -delete || : %{__chmod} -R u+w $RPM_BUILD_ROOT/* find $RPM_BUILD_ROOT | xargs -r touch %clean %{__rm} -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc Changes README %{perl_vendorlib}/* %{_mandir}/man*/* %changelog * Sun May 28 2006 Marius Feraru - 1.15-1.n0i.7 - version 1.15 * Thu Jul 28 2005 Marius Feraru 1.13-2.n0i.6 - spec file (re)created using N0i::CPAN::RPMizer/1.01 - rebuild on perl 5.8.7 * Thu Mar 31 2005 Marius Feraru 0:1.13-1.n0i.5 - automatic rebuild (perl 5.8.6) * Mon Dec 06 2004 Marius Feraru 0:1.13-1.n0i.4 - version 1.13 * Fri Jul 09 2004 Marius Feraru 0:1.12-2.n0i.3 - version 1.12 * Thu May 06 2004 Marius Feraru 0:1.11-1.n0i.2 - spec file (re?)created using N0i::CPAN::RPMizer/2004050401 - rebuild (perl 5.8.4) * Fri Jan 30 2004 Marius FERARU 0:1.11-0.n0i.1 - version 1.11 - spec file (re?)created using N0i::CPAN::RPMizer/2004011001 * Wed Jul 30 2003 Marius FERARU 1.00-0.n0i - version 1.00 - RHL-ified spec file.