Fix some backwards-compatibility problems with Storable.
Marcus Holland-Moritz [Sun, 22 Aug 2004 22:18:56 +0000 (22:18 +0000)]
p4raw-id: //depot/perl@23233

ext/Storable/Storable.xs
ext/Storable/t/weak.t

index 3c65c4a..81bfb90 100644 (file)
 #include <XSUB.h>
 
 #ifndef PATCHLEVEL
-#    include <patchlevel.h>            /* Perl's one, needed since 5.6 */
-#    if !(defined(PERL_VERSION) || (SUBVERSION > 0 && defined(PATCHLEVEL)))
-#        include <could_not_find_Perl_patchlevel.h>
-#    endif
+#include <patchlevel.h>                /* Perl's one, needed since 5.6 */
 #endif
 
-#if PERL_VERSION < 8
+#if !defined(PERL_VERSION) || PERL_VERSION < 8
 #include "ppport.h"             /* handle old perls */
 #endif
 
index 59e8e2b..a8b708b 100644 (file)
@@ -25,7 +25,7 @@ sub BEGIN {
   }
 
   require Scalar::Util;
-  Scalar::Util->import qw(weaken isweak);
+  Scalar::Util->import(qw(weaken isweak));
   if (grep { /weaken/ } @Scalar::Util::EXPORT_FAIL) {
     print("1..0 # Skip: No support for weaken in Scalar::Util\n");
     exit 0;