This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
parts/inc/magic: Fix to run on early perls
authorKarl Williamson <khw@cpan.org>
Thu, 18 Jul 2019 18:38:15 +0000 (12:38 -0600)
committerNicolas R <atoomic@cpan.org>
Fri, 27 Sep 2019 22:51:28 +0000 (16:51 -0600)
No for postfix modifier; use numeric comparison for $]

(cherry picked from commit c0b235db11fc135c6da5f5b2890fa44bc1aad10c)
Signed-off-by: Nicolas R <atoomic@cpan.org>
dist/Devel-PPPort/parts/inc/magic
dist/Devel-PPPort/t/magic.t

index 84f0fd9..bf1a2f3 100644 (file)
@@ -623,8 +623,10 @@ my $foo = 'bar';
 ok(Devel::PPPort::sv_magic_portable($foo));
 ok($foo eq 'bar');
 
-if ( "$]" lt '5.007003' ) {
-    skip 'skip: no SV_NOSTEAL support', 0 for 1..22;
+if ( "$]" < '5.007003' ) {
+    for (1..22) {
+        skip 'skip: no SV_NOSTEAL support', 0;
+    }
 } else {
     tie my $scalar, 'TieScalarCounter', 10;
     my $fetch = $scalar;
index e00d5c8..c7a9e1a 100644 (file)
@@ -118,8 +118,10 @@ my $foo = 'bar';
 ok(Devel::PPPort::sv_magic_portable($foo));
 ok($foo eq 'bar');
 
-if ( "$]" lt '5.007003' ) {
-    skip 'skip: no SV_NOSTEAL support', 0 for 1..22;
+if ( "$]" < '5.007003' ) {
+    for (1..22) {
+        skip 'skip: no SV_NOSTEAL support', 0;
+    }
 } else {
     tie my $scalar, 'TieScalarCounter', 10;
     my $fetch = $scalar;