NAME
App::Base::Script::OnlyOne - do not allow more than one instance running
SYNOPSIS
use Moose;
extends 'App::Base::Script';
with 'App::Base::Script::OnlyOne';
DESCRIPTION
With this role your script will refuse to start if another copy of the script is running already (or if it is deadlocked or entered an infinite loop because of programming error). After start it tries to lock pid file, and if this is not possible, it croaks.
LICENSE AND COPYRIGHT
Copyright (C) 2010-2014 Binary.com
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.