# Maintainer: Alexey Pavlov <alexpux@gmail.com>

_realname=Return-MultiLevel
pkgname=perl-${_realname}
pkgver=0.05
pkgrel=1
pkgdesc="Return across multiple call levels"
arch=('any')
url="https://metacpan.org/release/Return-MultiLevel"
groups=('perl-modules')
license=('PerlArtistic')
depends=('perl-Data-Munge')
checkdepends=('perl-Test-Fatal')
options=('!emptydirs')
source=("https://cpan.metacpan.org/authors/id/M/MA/MAUKE/${_realname}-${pkgver}.tar.gz")
sha256sums=('ff076fbaba653c09953ac53959fe6c64fb52a33db3b5d223a015ab75ac3ed91d')

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

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

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

  find ${pkgdir} -name '.packlist' -delete
  find ${pkgdir} -name '*.pod' -delete
}
