2024-01-06 08:40:45 +01:00
|
|
|
%define perl_major_ver %(eval `perl -V:version`; echo ${version%*.[0-9]*}.0)
|
|
|
|
|
|
|
|
Name: perl-Class-ErrorHandler
|
2024-01-06 08:40:46 +01:00
|
|
|
Version: 0.04
|
2024-01-06 08:40:45 +01:00
|
|
|
Release: 1mamba
|
|
|
|
Summary: Class::ErrorHandler - Base class for error handling
|
|
|
|
Group: System/Libraries/Perl
|
|
|
|
Vendor: openmamba
|
|
|
|
Distribution: openmamba
|
2024-01-06 08:40:46 +01:00
|
|
|
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
|
|
|
URL: https://www.cpan.org/
|
|
|
|
Source: https://cpan.metacpan.org/modules/by-module/Class/Class-ErrorHandler-%{version}.tar.gz
|
2024-01-06 08:40:45 +01:00
|
|
|
License: Artistic, GPL
|
2024-01-06 08:40:46 +01:00
|
|
|
## AUTOBUILDREQ-BEGIN
|
|
|
|
BuildRequires: perl-devel
|
|
|
|
## AUTOBUILDREQ-END
|
2024-01-06 08:40:45 +01:00
|
|
|
BuildRequires: perl-devel >= %perl_major_ver
|
|
|
|
BuildRequires: perl-Module-Build
|
2024-01-06 08:40:46 +01:00
|
|
|
Requires: perl >= %perl_major_ver
|
2024-01-06 08:40:45 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
Class::ErrorHandler provides an error-handling mechanism that's generic enough to be used as the base class for a variety of OO classes.
|
|
|
|
Subclasses inherit its two error-handling methods, error and errstr, to communicate error messages back to the calling program.
|
|
|
|
|
|
|
|
On failure (for whatever reason), a subclass should call error and return to the caller; error itself sets the error message internally, then returns undef.
|
|
|
|
This has the effect of the method that failed returning undef to the caller.
|
|
|
|
The caller should check for errors by checking for a return value of undef, and calling errstr to get the value of the error message on an error.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n Class-ErrorHandler-%{version}
|
|
|
|
|
|
|
|
%build
|
2024-01-06 08:40:46 +01:00
|
|
|
%{__perl} Makefile.PL PREFIX=%{_prefix} INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
|
2024-01-06 08:40:45 +01:00
|
|
|
|
2024-01-06 08:40:46 +01:00
|
|
|
%make
|
|
|
|
%make test
|
2024-01-06 08:40:45 +01:00
|
|
|
|
|
|
|
%install
|
|
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
2024-01-06 08:40:46 +01:00
|
|
|
%makeinstall_perl
|
|
|
|
|
|
|
|
packlist=`find %{buildroot} -name .packlist`
|
|
|
|
[ -z "$packlist" ] && exit 1 || cat $packlist | \
|
|
|
|
sed "s,%{buildroot},,g;s,.*/man/.*,&.gz,g" | \
|
|
|
|
sort -u > .packlist && rm -f $packlist
|
|
|
|
|
|
|
|
strid=`echo $packlist | sed 's,.*auto\(.*\)/.packlist,\1,'`
|
|
|
|
for dir in `find %{buildroot} -type d | grep $strid`; do
|
|
|
|
echo "%dir ${dir#%buildroot}" >> .packlist
|
|
|
|
done
|
2024-01-06 08:40:45 +01:00
|
|
|
|
|
|
|
%clean
|
|
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
|
|
|
|
|
|
|
%files -f .packlist
|
|
|
|
%defattr(-,root,root)
|
|
|
|
|
|
|
|
%changelog
|
2024-01-06 08:40:46 +01:00
|
|
|
* Sun May 16 2021 Automatic Build System <autodist@mambasoft.it> 0.04-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-06 08:40:45 +01:00
|
|
|
* Sun Dec 15 2013 Automatic Build System <autodist@mambasoft.it> 0.03-1mamba
|
|
|
|
- automatic update by autodist
|
|
|
|
|
|
|
|
* Tue Apr 30 2013 Automatic Build System <autodist@mambasoft.it> 0.02-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
|
|
|
* Tue Nov 04 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 0.01-2mamba
|
|
|
|
- automatic rebuild by autodist
|
|
|
|
|
|
|
|
* Wed Aug 29 2007 Stefano Cotta Ramusino <stefano.cotta@openmamba.org> 0.01-1mamba
|
|
|
|
- package created by autospec
|