mirror of
https://git.freebsd.org/ports.git
synced 2026-06-02 11:08:52 +00:00
74d272b780
This module provides a syntax plugin that implements a block which executes
when the containing scope has finished.
use Syntax::Keyword::Defer;
{
my $dbh = DBI->connect( ... ) or die "Cannot connect";
defer { $dbh->disconnect; }
my $sth = $dbh->prepare( ... ) or die "Cannot prepare";
defer { $sth->finish; }
...
}
25 lines
562 B
Makefile
25 lines
562 B
Makefile
PORTNAME= Syntax-Keyword-Defer
|
|
PORTVERSION= 0.11
|
|
CATEGORIES= devel perl5
|
|
MASTER_SITES= CPAN
|
|
MASTER_SITE_SUBDIR= CPAN:PEVANS
|
|
PKGNAMEPREFIX= p5-
|
|
|
|
MAINTAINER= dvl@FreeBSD.org
|
|
COMMENT= Execute code when leaving a block
|
|
WWW= https://metacpan.org/pod/Syntax::Keyword::Defer
|
|
|
|
LICENSE= ART10
|
|
|
|
USES= perl5
|
|
USE_PERL5= modbuild
|
|
|
|
MY_DEPENDS= p5-XS-Parse-Keyword>0:devel/p5-XS-Parse-Keyword
|
|
BUILD_DEPENDS= ${MY_DEPENDS}
|
|
RUN_DEPENDS= ${MY_DEPENDS}
|
|
|
|
post-install:
|
|
${STRIP_CMD} ${STAGEDIR}${PREFIX}/${SITE_ARCH_REL}/auto/Syntax/Keyword/Defer/Defer.so
|
|
|
|
.include <bsd.port.mk>
|