Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the WWW-Mechanize CPAN distribution.

Report information
The Basics
Id: 3056
Status: resolved
Priority: 0/
Queue: WWW-Mechanize

People
Owner: Nobody in particular
Requestors: nkiesel [...] tbdnetworks.com
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: Add automatic success check
Hi, it would be very handy if Mechanize would have a "check" option (like the quiet option). Something like adding "die 'operation was not successful' if $self->{check} && !$self->success" just before returning to the invoker. Dreaming on, it would be even nicer if I could register a callback function which would be called whenever a request failed and registering 'undef' as the callback would switch the check option off. A default callback could e.g. just die with a nice warning. I even think that having "die" as the default method would make sense (given the fact that the FAQ states you have to do this anyway). If someone does not want this new behavior, she could just issue a "$mech->check(undef)". What do you think? I might even try to submit a patch if you like this idea... so long Norbert
Date: Sun, 27 Jul 2003 21:34:54 -0500
To: bug-WWW-Mechanize [...] rt.cpan.org
From: Andy Lester <andy [...] petdance.com>
Subject: Re: [cpan #3056] Add automatic success check
RT-Send-Cc:
Well, the callback idea I like. I'd be willing to do that. There's no way it'll be on by default, though. xoxo, Andy -- Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance
From: mark [...] summersault.com
[PETDANCE - Sun Jul 27 22:34:59 2003]: Show quoted text
> Well, the callback idea I like. I'd be willing to do that. There's > no way it'll be on by default, though.
The callback could also be used as foundation for addressing Bug #2814, which also takes action whenever a new page is loaded. (#2814 is my wish to create a trail of HTML files of the session...I may already have some starter code for this, if I didn't lose it a recent drive crash). Mark