From: Nicholas Clark Date: Thu, 15 Mar 2007 11:35:26 +0000 (+0000) Subject: Tweak to Storable to make dclone.t pass on 5.005_03. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ab30d4ce12e6cdc36040bb23cab295292a3d222b;p=p5sagit%2Fp5-mst-13.2.git Tweak to Storable to make dclone.t pass on 5.005_03. p4raw-id: //depot/perl@30593 --- diff --git a/ext/Storable/Storable.xs b/ext/Storable/Storable.xs index 77ee1b7..4f0a0e8 100644 --- a/ext/Storable/Storable.xs +++ b/ext/Storable/Storable.xs @@ -6291,7 +6291,11 @@ static SV *dclone(pTHX_ SV *sv) * Tied elements seem to need special handling. */ - if (SvTYPE(sv) == SVt_PVLV && SvRMAGICAL(sv) && mg_find(sv, 'p')) { + if ((SvTYPE(sv) == SVt_PVLV +#if PERL_VERSION < 6 + || SvTYPE(sv) == SVt_PVMG +#endif + ) && SvRMAGICAL(sv) && mg_find(sv, 'p')) { mg_get(sv); }