About Site Map Submit Contact Us Log in | Create an account
Create an account Log In
Average Rating
User Rating:
Visitors Rating:
My rating:

Write review
See full specifications

linux default iconGuard linux Publisher's description

Safe cleanup blocks

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

Specifically, this module supports two different types of guards: guard objects, which execute a given code block when destroyed, and scoped guards, which are tied to the scope exit.


use Guard;

# temporarily chdir to "/etc" directory, but make sure
# to go back to "/" no matter how myfun exits:
sub myfun {
scope_guard { chdir "/" };
chdir "/etc";


# create an object that, when the last reference to it is gone,
# invokes the given codeblock:
my $guard = guard { print "destroyed!
" };
undef $guard; # probably destroyed here

System Requirements:

Program Release Status:
Program Install Support: Install and Uninstall

Guard linux Tags:

Click on a tag to find related softwares

Is Guard linux your software?

Manage your software

Most Popular

linux default icon GPass 0.5.1
GPass is a password manager for the GNOME2 desktop.
linux default icon ClarkConnect 5.0
The ClarkConnect solution is built on the stability and security of Linux.
linux default icon Endian Firewall Community 2.5.1
A turn-key Linux security distribution based on IPCop and Red Hat
linux default icon OpenSSH 5.9
OpenSSH is a FREE version of the SSH connectivity tools that technical users of the Internet rely on
linux default icon Quick Heal AntiVirus for Linux 10.00
Anti-virus software with a proactive defense

Related Category

» Firewalls (44)
» Other (285)