summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
Diffstat (limited to 'pp_sys.c')
-rw-r--r--pp_sys.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/pp_sys.c b/pp_sys.c
index c7212b3f32..71c5ca741d 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -1017,7 +1017,10 @@ PP(pp_dbmopen)
if (SvIV(right))
mPUSHu(O_RDWR|O_CREAT);
else
+ {
mPUSHu(O_RDWR);
+ if (!SvOK(right)) right = &PL_sv_no;
+ }
PUSHs(right);
PUTBACK;
call_sv(MUTABLE_SV(GvCV(gv)), G_SCALAR);