p5-Guard
scope guards, lighter alternative
WWW CVSWeb GITHub-
Package versionp5-Guard-1.023p0
-
MaintainerThe OpenBSD ports mailing-list
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.