Branch: refs/heads/book/qw-backslash Home: https://github.com/Perl/perl5 Commit: 2c32e432874f2da0cf2cfe63cd181f7e3b1ae103 https://github.com/Perl/perl5/commit/2c32e432874f2da0cf2cfe63cd181f7e3b1ae103 Author: Philippe Bruhat (BooK) <b...@cpan.org> Date: 2025-07-08 (Tue, 08 Jul 2025)
Changed paths: M pod/perldiag.pod M t/lib/warnings/toke M toke.c Log Message: ----------- add a new warning against using \ in qw() I've seen AI-generated code try to use qw() to create lists containing strings with embedded whitespace using qw and \ to "protect" the whitespace. Things like: my @list = qw( foo bar\ baz ); Just like occurences of ',' and '#', I believe this should warn. Note that the warning will only be emitted when the \ is followed by actual whitespace, so code like the following (from lib/App/Cpan.pm) will not warn: my $epic_fail_words = join '|', qw( Error stop(?:ping)? problems force not unsupported fail(?:ed)? Cannot\s+install ); Commit: ee06f66cffe6d0c8442b7e1b6c580d853768f3e8 https://github.com/Perl/perl5/commit/ee06f66cffe6d0c8442b7e1b6c580d853768f3e8 Author: Philippe Bruhat (BooK) <b...@cpan.org> Date: 2025-07-08 (Tue, 08 Jul 2025) Changed paths: M pod/perldelta.pod Log Message: ----------- add perldelta entry for the new qw warning Compare: https://github.com/Perl/perl5/compare/d5f5af1116c1...ee06f66cffe6 To unsubscribe from these emails, change your notification settings at https://github.com/Perl/perl5/settings/notifications