|
General DBM traps.
- * DBM
-
Existing dbm databases created under perl4 (or any other dbm/ndbm tool) may cause the
same script, run under perl5, to fail. The build of perl5 must have been linked with the
same dbm/ndbm as the default for dbmopen() to function properly without tie'ing
to an extension dbm implementation.
dbmopen (%dbm, "file", undef);
print "ok\n";
# perl4 prints: ok
# perl5 prints: ok (IFF linked with -ldbm or -lndbm)
|
|
- * DBM
-
Existing dbm databases created under perl4 (or any other dbm/ndbm tool) may cause the
same script, run under perl5, to fail. The error generated when exceeding the limit on the
key/value size will cause perl5 to exit immediately.
dbmopen(DB, "testdb",0600) || die "couldn't open db! $!";
$DB{'trap'} = "x" x 1024; # value too large for most dbm/ndbm
print "YUP\n";
# perl4 prints:
dbm store returned -1, errno 28, key "trap" at - line 3.
YUP
# perl5 prints:
dbm store returned -1, errno 28, key "trap" at - line 3.
|
|
|
|