diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-10-27 23:53:46 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-10-28 02:04:58 -0700 |
commit | 04fae10148c49c60f1578c0a2cb6ab08cd231927 (patch) | |
tree | 20d2b5fa3aa69250de649492d86fb0b48ab40868 /sv.c | |
parent | 2a469b748886d8554868549b629e95c177fef346 (diff) | |
download | perl-04fae10148c49c60f1578c0a2cb6ab08cd231927.tar.gz |
sv.c: Allow blessed cows
There is no reason kine should not receive blessings, too.
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -9446,9 +9446,7 @@ Perl_sv_bless(pTHX_ SV *const sv, HV *const stash) Perl_croak(aTHX_ "Can't bless non-reference value"); tmpRef = SvRV(sv); if (SvFLAGS(tmpRef) & (SVs_OBJECT|SVf_READONLY)) { - if (SvIsCOW(tmpRef)) - sv_force_normal_flags(tmpRef, 0); - if (SvREADONLY(tmpRef)) + if (SvREADONLY(tmpRef) && !SvIsCOW(tmpRef)) Perl_croak_no_modify(aTHX); if (SvOBJECT(tmpRef)) { if (SvTYPE(tmpRef) != SVt_PVIO) |