summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/sv.c b/sv.c
index ff9986771e..b5e408c19e 100644
--- a/sv.c
+++ b/sv.c
@@ -1906,8 +1906,11 @@ sv_setsv(SV *dstr, register SV *sstr)
switch (stype) {
case SVt_NULL:
- (void)SvOK_off(dstr);
- return;
+ if (dtype != SVt_PVGV) {
+ (void)SvOK_off(dstr);
+ return;
+ }
+ break;
case SVt_IV:
if (dtype != SVt_IV && dtype < SVt_PVIV) {
if (dtype < SVt_IV)
@@ -2209,7 +2212,12 @@ sv_setsv(SV *dstr, register SV *sstr)
SvIVX(dstr) = SvIVX(sstr);
}
else {
- (void)SvOK_off(dstr);
+ if (dtype == SVt_PVGV) {
+ if (dowarn)
+ warn("Undefined value assigned to typeglob");
+ }
+ else
+ (void)SvOK_off(dstr);
}
SvTAINT(dstr);
}