# Maintainer: Peter Budai <peterbudai@hotmail.com>

_realname=Test-Fatal
pkgname=perl-${_realname}
pkgver=0.016
pkgrel=1
pkgdesc="Incredibly simple helpers for testing code with exceptions"
arch=('any')
url="https://metacpan.org/release/Test-Fatal"
groups=('perl-modules')
depends=('perl' 'perl-Try-Tiny')
license=('GPL' 'PerlArtistic')
source=("http://search.cpan.org/CPAN/authors/id/R/RJ/RJBS/Test-Fatal-${pkgver}.tar.gz")
sha256sums=('7283d430f2ba2030b8cd979ae3039d3f1b2ec3dde1a11ca6ae09f992a66f788f')

prepare() {
  cd "${srcdir}/${_realname}-${pkgver}"
}

build() {
  cd "${srcdir}/${_realname}-${pkgver}"
  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
  make
}

check() (
  cd "${srcdir}/${_realname}-${pkgver}"
  make test
)

package() {
  cd "${srcdir}/${_realname}-${pkgver}"
  make install DESTDIR="${pkgdir}"
}
