Package: perl
Version: 5.8.8-7
Severity: important
Try the following pearl:
## begin test script
#! /usr/bin/perl
use GDBM_File;
%iddb = ();
tie %iddb, 'GDBM_File', './weird', &GDBM_WRCREAT|&GDBM_NOLOCK, 0600;
for (1..200) { $iddb{"foo$_"} = $_; }
print "Before deletion:\n\n";
while (my ($k, $v) = each %iddb) { print "$k:$v\n"; }
while (my ($k, $v) = each %iddb) { delete $iddb{$k} if $v > 150 ; }
print "\n\nAfter deletion:\n\n";
while (my ($k, $v) = each %iddb) { print "$k:$v\n"; }
untie %iddb;
## end test script
This is only the beginning, though. The same happens on
(net|free|open)bsd platforms with perl 5.8.8. On top of that, on those
platforms, the same happens with DB_File! (with the tie line changed to
suit, of course). OTOH, on Debian DB_File works as expected: the second
print loses all the values over 150.
For a bit of context, see the test results here:
http://cpantesters.perl.org/show/Mail-Sort.html#Mail-Sort-20070403
The severity may be a stretch but I think most real perl programs
involve a persistent hash.
-- System Information:
Debian Release: 4.0
APT prefers testing
APT policy: (500, 'testing')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/dash
Kernel: Linux 2.6.18-11unicorn200703160124
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Versions of packages perl depends on:
ii libc6 2.3.6.ds1-13 GNU C Library: Shared libraries
ii libdb4.4 4.4.20-8 Berkeley v4.4 Database Libraries [
ii libgdbm3 1.8.3-3 GNU dbm database routines (runtime
ii perl-base 5.8.8-7 The Pathologically Eclectic Rubbis
ii perl-modules 5.8.8-7 Core Perl modules
Versions of packages perl recommends:
ii perl-doc 5.8.8-7 Perl documentation
-- no debconf information
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]