App-Slaughter
view release on metacpan or search on metacpan
bin/slaughter view on Meta::CPAN
#
# Open the lock-file exclusively.
#
open( LOCK, ">>", $lockfile ) or
die "Failed to open lockfile at $lockfile - $!";
#
# Lock the file.
#
flock( LOCK, LOCK_EX | LOCK_NB ) or
die "$0 already running - Lock file $lockfile is locked";
#
# The file will be closed when slaughter terminates so although it
# looks like we're leaking a handle here this is intentional.
#
}
=begin doc
( run in 1.203 second using v1.01-cache-2.11-cpan-49f99fa48dc )