BSD Ports

devel/p5-Guard 1.023p0 OpenBSD

scope guards, lighter alternative

System
OpenBSD
Repository
OpenBSD ports
Maintainer
The OpenBSD ports mailing-list <[email protected]>
Categories
devel, perl5

Description

This module implements so-called "guards". A guard is something (usually an object) that "guards" a resource, ensuring that it is cleaned up when expected.

It is similar to eval {} blocks, except it's faster, and catches everything, including direct calls to exit and the like. Prerequisite to Coro.

Different from Scope::Guard and Sub::ScopeFinalizer, which actually implement dynamic, not scoped guards, and have a lot higher CPU, memory and typing overhead.

In the other systems

SystemPortVersion
OpenBSDdevel/p5-Guard1.023p0
FreeBSDdevel/p5-Guard1.023_2
NetBSDdevel/p5-Guard1.023nb12
DragonFlydevel/p5-Guard1.023_1
HardenedBSDdevel/p5-Guard1.023_2
GhostBSDdevel/p5-Guard1.023_2

Install

Binary package:

pkg_add p5-Guard

From the ports tree:

cd /usr/ports/devel/p5-Guard && make install

Dependencies

Required by 1