File-Pid reviews

RSS | Module Info

File-Pid (1.01) *

Don't use it. It just use kill 0 to check if pid is running. I've got a lot of problems under linux, because it can't reliably check the pid and mostly ignores already running program. It's unreliable. Don't use.

File-Pid (1.01) *

Aside from the false documentation, File::Pid is worthless as it cannot cope with stale PID files.

Perhaps this laughable bug will be fixed one day, but everyone is better off using superior alternatives such as Unix::PID anyway.

File-Pid (1.01) *****

Summary: A++++++, prompt solution. Pity about the SYNOPSIS. Will use again.

Version 1.01 doesn't document what the module does internally. It's easy enough to argue that a module shouldn't necessarily document its guts, but PID file manipulation is one of those basic tasks that's easy to do wrong. For my own confidence, I like to know whether a module does it right. Luckily this is Perl; anyone who wants to break conceptual encapsulation can easily view the source.

The documentation doesn't caution the user against using $pidfile->write() before checking $pidfile->running(), which would be common sense anyway, but the example in the SYNOPSIS shows write() being used before running(). Following the SYNOPSIS blindly leads to bad behavior.

Ignoring the documentation issues, the module's a joy to use and effective for common cases. I was able to add process locking (only run one of $0 at a time) to an existing program in just a few lines of code. I'll undoubtedly be using it again.