Execute code when leaving a block
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; } ... }
$
pkg install p5-Syntax-Keyword-DeferOrigin
devel/p5-Syntax-Keyword-Defer
Size
30.2KiB
License
ART10
Maintainer
dvl@FreeBSD.org
Dependencies
2 packages
Required by
0 packages