++ed by:

1 non-PAUSE user.

Li Jinfeng

NAME

MYDan::Util::ProcLock - Advisory lock using a regular file

SYNOPSIS

 use MYDan::Util::ProcLock;

 my $lock = MYDan::Util::ProcLock->new( '/lock/file' );

 if ( my $pid = $lock->check() )
 {
     print "Locked by $pid.\n";
 }

 $lock->lock();
 

METHODS

check()

Returns PID of owner, undef if not locked.

lock()

Attempts to acquire lock. Returns pid if successful, undef otherwise.

read()

Returns a running pid or undef.