summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
Diffstat (limited to 'pp_sys.c')
-rw-r--r--pp_sys.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/pp_sys.c b/pp_sys.c
index 2aa83a803e..b837a1edee 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -1112,10 +1112,11 @@ PP(pp_sselect)
SvGETMAGIC(sv);
if (!SvOK(sv))
continue;
- if (SvIsCOW(sv))
- sv_force_normal_flags(sv, 0);
- if (SvREADONLY(sv) && !(SvPOK(sv) && SvCUR(sv) == 0))
+ if (SvREADONLY(sv)) {
+ if (!(SvPOK(sv) && SvCUR(sv) == 0))
Perl_croak_no_modify();
+ }
+ else if (SvIsCOW(sv)) sv_force_normal_flags(sv, 0);
if (!SvPOK(sv)) {
if (!SvPOKp(sv))
Perl_ck_warner(aTHX_ packWARN(WARN_MISC),