Let me put it differently. Mech is a browser emulator. How sensible would it be for a browser to quit on 404s? Mech is a subclass of LWP::UserAgent. How sensible is it to change default behavior radically? Both are obvious mistakes.
This particular change was supposed to help new users, one imagines, but I’ve seen this question come up constantly since it was made: What the heck is going on? My script just quits!? And for adept users it broke all existing scripts and forces a new line of code in everything. I love the functionality of being able to put in your own code ref in but having it be the default is a mistake: conceptually, historically, and expectation-wise.
| [reply] |
| [reply] |
On moving forward and breaking compatibility is a gentle rant about precisely this. We had about 2 years of "crap, my recovery script I run once every forever is dying and $APPLICATION is dead in the water! HALP!" emails at $PREVIOUS_WORKPLACE because of this change. The old behavior would allow these scripts to work because autocheck was off, and the scripts were checking the errors; once it was on automatically, the scripts would crap out despite the "proper" error handling being in place.
The middle of an emergency is not when you want to try to explain how this change that has broken things and is costing money was, really, a good idea, and how, yes, they will have to patch the script if they want to move forward, and yes, they will have to do this on the production machine, and yes, they will have to get all the relevant people out of bed, and no, I don't think that's where the author's head was.
As I mention in the above node, this could have been done better, with examples of how so.
| [reply] |
1.49_01 Sat Sep 27 23:50:04 CDT 2008
========================================
[THINGS THAT MAY BREAK YOUR CODE]
The autocheck argument to the constructor is now ON by default,
unless WWW::Mechanize is being subclassed. There are so many new
programmers whose ->get() calls fail unchecked that I'm now putting
on the seat belts for them.
| [reply] |