diff options
author | Paul Marquess <paul.marquess@btinternet.com> | 2000-12-09 16:47:22 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-12-10 04:17:36 +0000 |
commit | cbc5248d01a71061a57c964b98f44bd4cb3a75c0 (patch) | |
tree | 0169f8eae7194b94bad445862b09d193b30ec79f /t/lib/db-hash.t | |
parent | b927783ed115112c7a2df385623196331409021a (diff) | |
download | perl-cbc5248d01a71061a57c964b98f44bd4cb3a75c0.tar.gz |
RE: [ID 20001013.009] DB_File issues warning when setting element to undef
Message-ID: <002001c061ff$b3aba820$a20a140a@bfs.phone.com>
p4raw-id: //depot/perl@8068
Diffstat (limited to 't/lib/db-hash.t')
-rwxr-xr-x | t/lib/db-hash.t | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/t/lib/db-hash.t b/t/lib/db-hash.t index b7018742e4..462796926c 100755 --- a/t/lib/db-hash.t +++ b/t/lib/db-hash.t @@ -12,7 +12,7 @@ BEGIN { use DB_File; use Fcntl; -print "1..109\n"; +print "1..110\n"; sub ok { @@ -682,4 +682,25 @@ EOM } +{ + # Bug ID 20001013.009 + # + # test that $hash{KEY} = undef doesn't produce the warning + # Use of uninitialized value in null operation + use warnings ; + use strict ; + use DB_File ; + + unlink $Dfile; + my %h ; + my $a = ""; + local $SIG{__WARN__} = sub {$a = $_[0]} ; + + tie %h, 'DB_File', $Dfile or die "Can't open file: $!\n" ; + $h{ABC} = undef; + ok(110, $a eq "") ; + untie %h; + unlink $Dfile; +} + exit ; |