NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Why "Ugh!"? (Score:1)
In the absence of some explicit documentation that says the example function doesn't return anything, the change you show seems reasonable.
And if you have explicit documentation that says the example function doesn't return anything, the change also seems reasonable -- it guarantees that someone using your interface can't ignore the documentation, depend on undocumented functionality, and force y
Re: (Score:2)
In the absence of some explicit documentation that says the example function doesn't return anything, the change you show seems reasonable.
I disagree. If it doesn't say it returns nothing, then you should assume it returns something.
In complete absence of info on what it returns, the code should thus become:
Re:Why “Ugh!”? (Score:1)
Mindlessly putting it one place is just as wrong as mindlessly putting it in another. If you don’t know where it goes, you don’t put it anywhere – you go and look at the docs and the rest of the codebase. If that’s not in the cards, for whatever reason, then you leave damn well alone – even if that means Perl::Critic continues moaning about it. Because it should. Filling in the paperwork just to make it happy without knowing what you’re doing is just self-deception.
Reply to This
Parent