From: Karen Etheridge Date: Sat, 29 Apr 2023 08:42:14 +0000 (+0200) Subject: skip quote-separator tests on newer perls that deprecate this behaviour X-Git-Tag: v0.27~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f9cd47d0513c55d26173de7fe49373b4bf574f43;p=p5sagit%2FSub-Name.git skip quote-separator tests on newer perls that deprecate this behaviour --- diff --git a/Changes b/Changes index 50053f3..02f8030 100644 --- 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 diff --git a/t/exotic_names.t b/t/exotic_names.t index a2813af..02887b5 100644 --- a/t/exotic_names.t +++ b/t/exotic_names.t @@ -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; diff --git a/t/quotes-bug.t b/t/quotes-bug.t index 4b5a67f..3ea3242 100644 --- a/t/quotes-bug.t +++ b/t/quotes-bug.t @@ -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;