In perl.git, the branch blead has been updated <https://perl5.git.perl.org/perl.git/commitdiff/823c3b2daca3409863f10ec5e1c6d416d2614a5a?hp=e06f52f05dbbeec7219ccfa7dc8a8b05669c6f80>
- Log ----------------------------------------------------------------- commit 823c3b2daca3409863f10ec5e1c6d416d2614a5a Author: Karl Williamson <[email protected]> Date: Wed Mar 13 10:38:13 2019 -0600 perldiag: A deprecation is now fatal commit 8f46dbea87575fb3e4cb9d714baf995ba5faf117 Author: Karl Williamson <[email protected]> Date: Tue Mar 12 16:21:27 2019 -0600 t/re/pat_advanced.t: Change some ok's to like's ----------------------------------------------------------------------- Summary of changes: pod/perldiag.pod | 8 ++++---- t/re/pat_advanced.t | 25 +++++++++++++------------ 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/pod/perldiag.pod b/pod/perldiag.pod index 7c5d9c8ad5..e0e56cbaae 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -7367,9 +7367,9 @@ but will become a fatal error in a future version of perl. Untaint your arguments. See L<perlsec>. =item Use of unassigned code point or non-standalone grapheme for a -delimiter will be a fatal error starting in Perl 5.30 +delimiter is not allowed -(D deprecated) +(F) A grapheme is what appears to a native-speaker of a language to be a character. In Unicode (and hence Perl) a grapheme may actually be several adjacent characters that together form a complete grapheme. For @@ -7379,7 +7379,7 @@ the circumflex hovering over the "R". Perl currently allows things like that circumflex to be delimiters of strings, patterns, I<etc>. When displayed, the circumflex would look like it belongs to the character just to the left of it. In order to move the language to be able to -accept graphemes as delimiters, we have to deprecate the use of +accept graphemes as delimiters, we cannot allow the use of delimiters which aren't graphemes by themselves. Also, a delimiter must already be assigned (or known to be never going to be assigned) to try to future-proof code, for otherwise code that works today would fail to @@ -7389,7 +7389,7 @@ assign L<non-character code points|perlunicode/Noncharacter code points>, nor L<code points that are above the legal Unicode maximum| perlunicode/Beyond Unicode code points>, those can be delimiters, and -their use won't raise this warning. +their use is legal. =item Use of uninitialized value%s diff --git a/t/re/pat_advanced.t b/t/re/pat_advanced.t index 2eec50221a..77befc14ba 100644 --- a/t/re/pat_advanced.t +++ b/t/re/pat_advanced.t @@ -783,11 +783,11 @@ sub run_tests { { my $re = qq /^([^X]*)X/; utf8::upgrade ($re); - ok "\x{100}X" =~ /$re/, "S_cl_and ANYOF_UNICODE & ANYOF_INVERTED"; + like "\x{100}X", qr/$re/, "S_cl_and ANYOF_UNICODE & ANYOF_INVERTED"; my $loc_re = qq /(?l:^([^X]*)X)/; utf8::upgrade ($loc_re); no warnings 'locale'; - ok "\x{100}X" =~ /$loc_re/, "locale, S_cl_and ANYOF_UNICODE & ANYOF_INVERTED"; + like "\x{100}X", qr/$loc_re/, "locale, S_cl_and ANYOF_UNICODE & ANYOF_INVERTED"; } { @@ -2110,7 +2110,7 @@ EOP } # RT #82610 - ok 'foo/file.fob' =~ m,^(?=[^\.])[^/]*/(?=[^\.])[^/]*\.fo[^/]$,; + like 'foo/file.fob', qr,^(?=[^\.])[^/]*/(?=[^\.])[^/]*\.fo[^/]$,; { # This was failing unless an explicit /d was added my $E0 = uni_to_native("\xE0"); @@ -2374,33 +2374,34 @@ EOF # scoped, and want to turn them off, so have to do the match in this # scope. if ($Config{uvsize} < 8) { - ok(chr(0x7FFF_FFFE) =~ /\p{Is_31_Bit_Super}/, + like(chr(0x7FFF_FFFE), qr/\p{Is_31_Bit_Super}/, "chr(0x7FFF_FFFE) can match a Unicode property"); - ok(chr(0x7FFF_FFFF) =~ /\p{Is_31_Bit_Super}/, + like(chr(0x7FFF_FFFF), qr/\p{Is_31_Bit_Super}/, "chr(0x7FFF_FFFF) can match a Unicode property"); my $p = qr/^[\x{7FFF_FFFF}]$/; - ok(chr(0x7FFF_FFFF) =~ $p, + like(chr(0x7FFF_FFFF), qr/$p/, "chr(0x7FFF_FFFF) can match itself in a [class]"); - ok(chr(0x7FFF_FFFF) =~ $p, # Tests any caching + like(chr(0x7FFF_FFFF), qr/$p/, # Tests any caching "chr(0x7FFF_FFFF) can match itself in a [class] subsequently"); } else { no warnings 'overflow'; - ok(chr(0x7FFF_FFFF_FFFF_FFFE) =~ qr/\p{Is_Portable_Super}/, + like(chr(0x7FFF_FFFF_FFFF_FFFE), qr/\p{Is_Portable_Super}/, "chr(0x7FFF_FFFF_FFFF_FFFE) can match a Unicode property"); - ok(chr(0x7FFF_FFFF_FFFF_FFFF) =~ qr/^\p{Is_Portable_Super}$/, + like(chr(0x7FFF_FFFF_FFFF_FFFF), qr/^\p{Is_Portable_Super}$/, "chr(0x7FFF_FFFF_FFFF_FFFF) can match a Unicode property"); my $p = qr/^[\x{7FFF_FFFF_FFFF_FFFF}]$/; - ok(chr(0x7FFF_FFFF_FFFF_FFFF) =~ $p, + like(chr(0x7FFF_FFFF_FFFF_FFFF), qr/$p/, "chr(0x7FFF_FFFF_FFFF_FFFF) can match itself in a [class]"); - ok(chr(0x7FFF_FFFF_FFFF_FFFF) =~ $p, # Tests any caching + like(chr(0x7FFF_FFFF_FFFF_FFFF), qr/$p/, # Tests any caching "chr(0x7FFF_FFFF_FFFF_FFFF) can match itself in a [class] subsequently"); # This test is because something was declared as 32 bits, but # should have been cast to 64; only a problem where # sizeof(STRLEN) != sizeof(UV) - ok(chr(0x7FFF_FFFF_FFFF_FFFE) !~ qr/\p{Is_31_Bit_Super}/, "chr(0x7FFF_FFFF_FFFF_FFFE) shouldn't match a range ending in 0x7FFF_FFFF"); + unlike(chr(0x7FFF_FFFF_FFFF_FFFE), qr/\p{Is_31_Bit_Super}/, + "chr(0x7FFF_FFFF_FFFF_FFFE) shouldn't match a range ending in 0x7FFF_FFFF"); } } -- Perl5 Master Repository
