called, and the result will be a false value if FIRSTKEY returns the empty
list, true otherwise.
+However, you should B<not> blindly rely on perl always doing the right
+thing. Particularly, perl will mistakenly return true when you clear the
+hash by repeatedly calling DELETE until it is empty. You are therefore
+advised to supply your own SCALAR method when you want to be absolutely
+sure that your hash behaves nicely in scalar context.
+
In our example we can just call C<scalar> on the underlying hash
referenced by C<$self-E<gt>{LIST}>:
sub PRINTF {
shift;
my $fmt = shift;
- print sprintf($fmt, @_)."\n";
+ print sprintf($fmt, @_);
}
=item READ this, LIST
hashes) to a dbm file. The first problem is that all but GDBM and
Berkeley DB have size limitations, but beyond that, you also have problems
with how references are to be represented on disk. One experimental
-module that does attempt to address this need partially is the MLDBM
-module. Check your nearest CPAN site as described in L<perlmodlib> for
-source code to MLDBM.
+module that does attempt to address this need is DBM::Deep. Check your
+nearest CPAN site as described in L<perlmodlib> for source code. Note
+that despite its name, DBM::Deep does not use dbm. Another earlier attempt
+at solving the problem is MLDBM, which is also available on the CPAN, but
+which has some fairly serious limitations.
Tied filehandles are still incomplete. sysopen(), truncate(),
flock(), fcntl(), stat() and -X can't currently be trapped.