This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Tweak to Storable to make dclone.t pass on 5.005_03.
authorNicholas Clark <nick@ccl4.org>
Thu, 15 Mar 2007 11:35:26 +0000 (11:35 +0000)
committerNicholas Clark <nick@ccl4.org>
Thu, 15 Mar 2007 11:35:26 +0000 (11:35 +0000)
p4raw-id: //depot/perl@30593

ext/Storable/Storable.xs

index 77ee1b7..4f0a0e8 100644 (file)
@@ -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);
        }