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

_realname=Test-Fatal
pkgname=perl-${_realname}
pkgver=0.019
pkgrel=1
pkgdesc="Incredibly simple helpers for testing code with exceptions"
arch=('any')
url="https://metacpan.org/release/Test-Fatal"
msys2_repository_url='https://github.com/rjbs/Test-Fatal'
msys2_changelog_url='https://metacpan.org/dist/Test-Fatal/changes'
msys2_references=(
  'purl: pkg:cpan/RJBS/Test-Fatal'
)
groups=('perl-modules')
depends=('perl' 'perl-Try-Tiny')
license=('spdx:Artistic-1.0-Perl OR GPL-1.0-or-later')
source=("http://search.cpan.org/CPAN/authors/id/R/RJ/RJBS/Test-Fatal-${pkgver}.tar.gz")
sha256sums=('d8f6b6c87bb399a7d60c295a94a4b741a85b23889cfd6b72f1ff62f0c55cf70b')

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

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

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