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
| System | Port | Version |
|---|---|---|
| OpenBSD | devel/p5-Guard | 1.023p0 |
| FreeBSD | devel/p5-Guard | 1.023_2 |
| NetBSD | devel/p5-Guard | 1.023nb12 |
| DragonFly | devel/p5-Guard | 1.023_1 |
| HardenedBSD | devel/p5-Guard | 1.023_2 |
| GhostBSD | devel/p5-Guard | 1.023_2 |
Install
Binary package:
pkg_add p5-Guard
From the ports tree:
cd /usr/ports/devel/p5-Guard && make install