Branch: refs/heads/yves/force_upgrade_var Home: https://github.com/Perl/perl5 Commit: c9f556734209c569d4f9b642114d060e579de2b5 https://github.com/Perl/perl5/commit/c9f556734209c569d4f9b642114d060e579de2b5 Author: Yves Orton <demer...@gmail.com> Date: 2022-10-30 (Sun, 30 Oct 2022)
Changed paths: M gv.c M lib/utf8.pm M pod/perldelta.pod M pod/perlvar.pod Log Message: ----------- gv.c - add ${^FORCE_UPGRADE} for triggering upgrade by concatenation This is a readonly global variable which contains an upgraded empty string (eg UTF8-on). When concatenated into a string it (like any other upgraded string) causes the resulting string to also be upgraded. Similar to calling utf8::upgrade() on the string, but suitable for use in double quoted strings or regex patterns or other places where adding a utf8::upgrade() call might be awkward. Assuming this gets merged I can think of some test code that could be cleaned up by using this, and I definitely would use it in one-liners and what not as well.