in reply to RFC: A new module to help avoid running multiple instances of the same script (via cron, for example)
What about using Process:: instead? Something like Process::AvoidConcurrentRuns or Process::AvoidMultipleInstances or Process::Singleton
Also if you put this on CPAN, you might think about different possible use cases:
# first case: use Process::Singleton qw(:auto_verbose); # second case: use Process::Singleton qw(:auto); # third case: use Process::Singleton qw(is_running); if (is_running()) { ... } else { ... }
This is of course just an example, but I want to encourage you to think more about the interface.
|
---|