%define upstream_name DBIx-Error %define upstream_version 1.0 Name: perl-%{upstream_name} Version: %perl_convert_version %{upstream_version} Release: %mkrel 1 Summary: Structured exceptions for DBI License: GPL+ or Artistic Group: Development/Perl Url: http://search.cpan.org/dist/%{upstream_name} Source0: https://www.cpan.org/modules/by-module/DBIx/%{upstream_name}-%{upstream_version}.tar.gz BuildRequires: perl(Test::More) BuildRequires: perl(Test::Exception) BuildRequires: perl(Test::Moose) BuildRequires: perl(DBI) BuildRequires: perl(DBD::SQLite) BuildRequires: perl(DBIx::Class) BuildRequires: perl(FindBin) BuildRequires: perl(File::Spec::Functions) BuildRequires: perl(Moose) BuildRequires: perl(MooseX::StrictConstructor) BuildRequires: perl(namespace::autoclean) BuildRequires: perl(Throwable::Error) BuildArch: noarch %description "DBIx::Error" provides structured exceptions for "DBI" errors. Each five-character "SQLSTATE" is mapped to a Perl exception class, allowing exceptions to be caught using code such as try { ... } catch ( DBIx::Error::NotNullViolation $err ) { ... } catch ( DBIx::Error::UniqueViolation $err ) { ... } The exception stringifies to produce the full "DBI" error message (including a stack trace). The original DBI error attributes ("err", "errstr" and "state") are also provided for inspection. %prep %setup -q -n %{upstream_name}-%{upstream_version} %build %{__perl} Makefile.PL INSTALLDIRS=vendor %make %check %make test %install %make_install %files %doc CHANGES META.yml MYMETA.json MYMETA.yml README %{_mandir}/man3/* %perl_vendorlib/*