MYDan::Util::ProcLock - Advisory lock using a regular file
use MYDan::Util::ProcLock; my $lock = MYDan::Util::ProcLock->new( '/lock/file' ); if ( my $pid = $lock->check() ) { print "Locked by $pid.\n"; } $lock->lock();
Returns PID of owner, undef if not locked.
Attempts to acquire lock. Returns pid if successful, undef otherwise.
Returns a running pid or undef.
To install MYDan, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MYDan
CPAN shell
perl -MCPAN -e shell install MYDan
For more information on module installation, please visit the detailed CPAN module installation guide.