Commit | Line | Data |
4cd62f77 |
1 | use strict; |
2 | use warnings; |
3 | |
a6602ad5 |
4 | use Test::More; |
a31b59ba |
5 | use if $ENV{AUTHOR_TESTING}, 'Test::Warnings'; |
4cd62f77 |
6 | use Sub::Name; |
7 | |
a6602ad5 |
8 | plan skip_all => 'single quote as a package separator has been removed' |
9 | if "$]" gt '5.041001'; |
10 | plan skip_all => 'single quote as a package separator has been deprecated' |
11 | if "$]" gt '5.037009'; |
12 | |
4cd62f77 |
13 | my $sub = sub { (caller(0))[3] }; |
14 | subname "foo::quz'bar::baz", $sub; |
15 | |
16 | # in 0.16, this was foo::quz::ba::baz |
17 | is( |
18 | $sub->(), |
19 | "foo::quz::bar::baz", |
20 | 'correctly parsed single quote from name where the last separator is ::', |
21 | ); |
a6602ad5 |
22 | |
23 | done_testing; |