$db->clear(); # hashes or arrays
-=item * lock_exclusive() / lock_shared() / lock() / unlock()
+=item * lock() / unlock() / lock_exclusive() / lock_shared()
q.v. L</LOCKING> for more info.
=head2 Explicit Locking
You can explicitly lock a database, so it remains locked for multiple
-actions. This is done by calling the C<lock()> method, and passing an
-optional lock mode argument (defaults to exclusive mode). This is particularly
-useful for things like counters, where the current value needs to be fetched,
-then incremented, then stored again.
+actions. This is done by calling the C<lock_exclusive()> method (for when you
+want to write) or the C<lock_shared()> method (for when you want to read).
+This is particularly useful for things like counters, where the current value
+needs to be fetched, then incremented, then stored again.
- $db->lock();
+ $db->lock_exclusive();
my $counter = $db->get("counter");
$counter++;
$db->put("counter", $counter);
# or...
- $db->lock();
+ $db->lock_exclusive();
$db->{counter}++;
$db->unlock();
-If you want a shared lock, you will need to call C<lock_shared()>. C<lock()> is
-an alias to C<lock_exclusive()>.
-
=head2 Win32/Cygwin
Due to Win32 actually enforcing the read-only status of a shared lock, all