CC: | 159485 [...] bugs.debian.org |
Subject: | can't set global options |
The following wishlist bug has been reported in Debian at
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=159485
Using LockFile::Simple, you can just lock("file") and unlock("file")
without any more complexity. However, you can't configure(-hold => 0)
[which should be the default, but it's sort of documented that it
isn't so I can't really complain] because configure doesn't do the
"use default locker object" hack.
Grabbing the code in lock, namely
unless (ref $self) { # Not invoked as a method
unshift(@_, $self);
$self = locker();
}
and stuffing it into configure would let one configure the "global"
lock, which for simple scripts makes a fair bit of sense (though one
would need to document that because of this, packages should probably
use explicit lock objects...)