What's to stop someone else to revert your patch because he thinks he might remove an unneccessary 'if' clause?
The "normal" solution here would be to change the subroutine to the generic
sub add_stopwords { my @words= @_; for my $word (@words) {
Not that it is any better than the other two solutions but people might know better than to optimize that away without thinking about the consequences
To make sure nobody changes it back a comment could be added. And/or a test for it could be added (best practice for any bug found)
If you want to prod the unpaid, does-it-out-of-the-kindness-of-his-heart author of the module to modernize the code and add tests there are better ways than saying "There is a comment in the code promising something more modern. Is this not a great time to deliver?". I may be wrong, but to me it sounds more like a sugar-coated reproach than an appeal to his kindness.
In reply to Re: Problems with $_
by jethro
in thread Problems with $_
by SilasTheMonk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |