diff --git a/README.md b/README.md index 0e9930d..e21dc37 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,9 @@ # perl-Class-ErrorHandler +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. + diff --git a/perl-Class-ErrorHandler.spec b/perl-Class-ErrorHandler.spec new file mode 100644 index 0000000..87dbffe --- /dev/null +++ b/perl-Class-ErrorHandler.spec @@ -0,0 +1,73 @@ +%define perl_major_ver %(eval `perl -V:version`; echo ${version%*.[0-9]*}.0) + +Name: perl-Class-ErrorHandler +Version: 0.03 +Release: 1mamba +Summary: Class::ErrorHandler - Base class for error handling +Group: System/Libraries/Perl +Vendor: openmamba +Distribution: openmamba +Packager: Stefano Cotta Ramusino +URL: http://www.cpan.org +Source: http://www.cpan.org/modules/by-module/Class/Class-ErrorHandler-%{version}.tar.gz +License: Artistic, GPL +Requires: perl >= %perl_major_ver +BuildRequires: perl-devel >= %perl_major_ver +BuildRequires: perl-Module-Build +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%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 +%{__perl} Build.PL \ + installdirs=vendor \ + perl=%{__perl} + +./Build + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +./Build install destdir=%{buildroot} + +# cleanup unpackaged files +find %{buildroot}%{_libdir} \ + -type f \( -name perllocal.pod -o -name .packlist \) -exec rm -f {} \; +# remove empty directories +#find %{buildroot}%{perl_sitelib} \ +# -type d -depth -exec rmdir {} 2>/dev/null \; + +find %{buildroot} \( -type f -or -type l \) | \ + sed "s@%buildroot@@g;s@.*/man./.*@&.gz@g" | \ + sort -u > .packlist +find %{buildroot} -type d | \ + grep "%{perl_sitearch}/" | \ + sed "s@%buildroot@@g;s@.*@%dir &@g" >> .packlist + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +rm -f .packlist + +%files -f .packlist +%defattr(-,root,root) + +%changelog +* Sun Dec 15 2013 Automatic Build System 0.03-1mamba +- automatic update by autodist + +* Tue Apr 30 2013 Automatic Build System 0.02-1mamba +- automatic version update by autodist + +* Tue Nov 04 2008 Silvan Calarco 0.01-2mamba +- automatic rebuild by autodist + +* Wed Aug 29 2007 Stefano Cotta Ramusino 0.01-1mamba +- package created by autospec