According to the new source::encoding pragma's documentation,
use source::encoding 'ascii' is automatically enabled within the lexical scope of a use v5.41.0 or higher.
To me, this means that
is equivalent to
use v5.42;
use source::encoding "ascii";
But that doesn't seem to be the case.
$ perl -e'use v5.42; my $x = "é";'
$ perl -e'use v5.42; use source::encoding "ascii"; my $x = "é";'
Use of non-ASCII character 0xC3 illegal when 'use source::encoding "ascii"' is in effect at -e line 1, near ""ascii";"
Execution of -e aborted due to compilation errors.
Code bug, documentation bug, or misunderstanding?
This is perl 5, version 42, subversion 0 (v5.42.0) built for x86_64-linux-thread-multi