in reply to Problems with $_

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.

Replies are listed 'Best First'.
Re^2: Problems with $_
by SilasTheMonk (Chaplain) on May 26, 2011 at 09:55 UTC
    I may be wrong, but to me it sounds more like a sugar-coated reproach than an appeal to his kindness.
    So right. I read a very interesting book by Steven Pinker recently called the "The Stuff of thought." The chapter on indirect speach and politeness was a major revelation. I suddenly realized how I had been offending people all my life. I am still struggling to change the habits however.