Branch: refs/heads/book/qw-backslash Home: https://github.com/Perl/perl5 Commit: 08c90cfa703b9050ff45f3a7506d4e68c7d5e2bb https://github.com/Perl/perl5/commit/08c90cfa703b9050ff45f3a7506d4e68c7d5e2bb 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: d5f5af1116c15968909bbc0293ffe8d72bbfc214 https://github.com/Perl/perl5/commit/d5f5af1116c15968909bbc0293ffe8d72bbfc214 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/54e647e81a70...d5f5af1116c1 To unsubscribe from these emails, change your notification settings at https://github.com/Perl/perl5/settings/notifications