NAME
Script::Singleton - Ensure only a single instance of a script can run
SYNOPSIS
use Script::Singleton 'LOCK';
DESCRIPTION
Using shared memory, this distribution ensures only a single instance of any script can be running at any one time.
use Script::Singleton 'UNIQUE LOCK STRING', 1;
There are no functions or methods. All the work is performed in the use line. UNIQUE LOCK STRING
is the glue that identifies the shared memory segment. If a second parameter with a true value is sent in, we'll output a warning if the same script is run at the same time and it exits:
This software uses IPC::Shareable for the shared memory management, specifically its singleton() method.
AUTHOR
Steve Bertrand, <steveb at cpan.org>
LICENSE AND COPYRIGHT
Copyright 2021 Steve Bertrand.
This program is free software; you can redistribute it and/or modify it under the terms of the the Artistic License (2.0). You may obtain a copy of the full license at: