skip quote-separator tests on newer perls that deprecate this behaviour
Karen Etheridge [Sat, 29 Apr 2023 08:42:14 +0000 (10:42 +0200)]
Changes
t/exotic_names.t
t/quotes-bug.t

diff --git a/Changes b/Changes
index 50053f3..02f8030 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,6 +1,7 @@
 Revision history for Sub-Name
 
 {{$NEXT}}
+    - skip quote-separator tests on newer perls that deprecate this behaviour
 
 0.26      2019-10-05 22:23:12Z
     - no changes since 0.25
index a2813af..02887b5 100644 (file)
@@ -99,6 +99,11 @@ for my $ord (@ordinal) {
 
     # test that we can *always* compile at least within the correct package
     my $expected;
+  SKIP: {
+    skip 'single quote as a package separator has been '.
+        ("$]" gt '5.041001' ? 'removed' : 'deprecated'), 3
+        if $ord == 39 and "$]" gt '5.037009';
+
     if ( chr($ord) =~ m/^[$legal_ident_char]$/o ) { # compile directly
         $expected = "native::$fullname";
         $sub = compile_named_sub $expected => '(caller(0))[3]';
@@ -118,6 +123,7 @@ for my $ord (@ordinal) {
         $sub = compile_named_sub 'palatable::sub' => '(caller(0))[3]';
     }
     caller3_ok $sub, $expected, 'natively compiled sub', $ord;
+  }
 }
 
 done_testing;
index 4b5a67f..3ea3242 100644 (file)
@@ -5,6 +5,11 @@ use Test::More;
 use if $ENV{AUTHOR_TESTING}, 'Test::Warnings';
 use Sub::Name;
 
+plan skip_all => 'single quote as a package separator has been removed'
+  if "$]" gt '5.041001';
+plan skip_all => 'single quote as a package separator has been deprecated'
+  if "$]" gt '5.037009';
+
 my $sub = sub { (caller(0))[3] };
 subname "foo::quz'bar::baz", $sub;