Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^6: WWW::Mechanize - error on geting non-existing page

by Your Mother (Canon)
on Nov 06, 2011 at 21:50 UTC ( #936347=note: print w/ replies, xml ) Need Help??


in reply to Re^5: WWW::Mechanize - error on geting non-existing page
in thread WWW::Mechanize - error on geting non-existing page

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.


Comment on Re^6: WWW::Mechanize - error on geting non-existing page
Re^7: WWW::Mechanize - error on geting non-existing page
by GrandFather (Cardinal) on Nov 06, 2011 at 22:31 UTC

    Ah, yes I agree that changing default behaviour in that way is just a bad nasty horrible idea!

    True laziness is hard work
Re^7: WWW::Mechanize - error on geting non-existing page
by Anonymous Monk on Nov 07, 2011 at 06:34 UTC
    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.
    
Re^7: WWW::Mechanize - error on geting non-existing page
by pemungkah (Priest) on Dec 05, 2011 at 22:38 UTC
    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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://936347]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2014-09-22 03:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (178 votes), past polls