Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
1.85k stars 524 forks source link

perldiag: update "You need to quote X" %SIG diagnostic #22149

Closed mauke closed 2 weeks ago

mauke commented 2 weeks ago

The old description was clearly written for perl 4 programmers.

haarg commented 2 weeks ago

This is definitely an improvement. We may want to tweak it further though.

"Unfortunately, you already have a subroutine of that name declared" only really makes sense with strict off. It's implying a "fortunate" case where you are doing something like $SIG{INT} = IGNORE;, or $SIG{INT} = Foo::bar; before the bar sub is created.

mauke commented 2 weeks ago

@haarg Agreed. I've tried to reword it in a way that doesn't imply declaring subroutines (or enabling strict) is unfortunate. :wink: