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:Why "Ugh!"? (Score:1)
Beyond that, though, this change caused the entire module to become completely useless, which means that it wasn't desk checked. Why not? Because the module wasn't undergoing any actual maintenance. In the course of other work, someone saw Perl::Critic complain about "no explicit return" and added one, without further testing.
Sure, automated testing would've caught this, but if there are no automated tests, you don't make changes without desk checking them. More importantly, if the code is working, you don't change it without a reason.
Maybe "improve maintainability" is a reason for some changes, but not until there are tests to ensure that your changes don't, you know, break the program.
rjbs
Reply to This
Parent