X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=ext%2FStorable%2FStorable.xs;h=d3c0fab3866d96365a6830f82123c74e41828282;hb=e9d185f8391f09209c11be82e97358d853f1ba30;hp=2590bfa0bcca0bd53133cf8cdbba0d4340a867ce;hpb=da51bb9b4f7f527464b5e38aca8bcb956de1bbbc;p=p5sagit%2Fp5-mst-13.2.git diff --git a/ext/Storable/Storable.xs b/ext/Storable/Storable.xs index 2590bfa..d3c0fab 100644 --- a/ext/Storable/Storable.xs +++ b/ext/Storable/Storable.xs @@ -18,6 +18,8 @@ #endif #if !defined(PERL_VERSION) || PERL_VERSION < 8 +#define NEED_load_module +#define NEED_vload_module #include "ppport.h" /* handle old perls */ #endif @@ -6289,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 < 8 + || SvTYPE(sv) == SVt_PVMG +#endif + ) && SvRMAGICAL(sv) && mg_find(sv, 'p')) { mg_get(sv); }