Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

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

by Your Mother (Chancellor)
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

Replies are listed 'Best First'.
Re^7: WWW::Mechanize - error on geting non-existing page
by GrandFather (Sage) 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 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.

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
    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.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://936347]
LanX where is the camera?
Tux => $HOME
[Eily]: you wrote boos instead of boss, and jedikaiti read that as boobs :)
[LanX]: Win claims only 8 MB left on C: how do I find out where the problem happens?
[Eily]: by Tux. And going home sounds like a good idea
[Eily]: LanX pretty much everywhere except in 8MB ?
[Eily]: s/by/bye/ someone hacked my keyboard I'm sure
[LanX]: good point! :)
[Eily]: LanX I don't understand the question though, you want to know what is taking so much space?
[Tanktalus]: Probably the swapfile :)

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (13)
As of 2017-09-20 16:42 GMT
Find Nodes?
    Voting Booth?
    During the recent solar eclipse, I:

    Results (237 votes). Check out past polls.