You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to WWW::Mechanize users
Hi,
I've found myself wanting to do this:
my $mech = WWW::Mechanize( autocheck => 0 );
# run some tests that we know might 404 etc
$mech->autocheck( 1 );
# run more tests that we expect to never error
Is that silly? Should I just be creating a second Mechanize object
instance?
I think it's simple enough to implement, as "$mech->{autocheck} = [1|
0]" ought to suffice?
For instance ... I'd like to create a sub-class of
Test::WWW::Mechanize, which can implement a suite of my own tests ...
some of which I know will 404 etc, but the bulk of which want
autocheck => 1
Or have I just totally missed the obvious and not rtfm properly?
Thanks!
Andy Lester
unread,
Feb 24, 2012, 8:51:59 AM2/24/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to www-mecha...@googlegroups.com
On Feb 24, 2012, at 6:18 AM, mintywalker wrote:
Or have I just totally missed the obvious and not rtfm properly?
No, there's no method to do it. It's something that gets requested every so often, though. Maybe Jesse will add it.
There is no harm in setting $mech->{autocheck} yourself, at least as of this writing. But we all know how dangerous it is to rely on object internals.
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to WWW::Mechanize users
On Feb 24, 1:51 pm, Andy Lester <a...@petdance.com> wrote:
> On Feb 24, 2012, at 6:18 AM, mintywalker wrote:
>
> > Or have I just totally missed the obvious and not rtfm properly?
>
> No, there's no method to do it. It's something that gets requested every so often, though. Maybe Jesse will add it.
I've implemented what I think is required, and sent a Pull request.
If I've missed anything, do please point me in the right direction
It looks good to me, especially that you've updated the t/autocheck.t file. I don't maintain Mech any more, but I don't see any reason why Jesse wouldn't use it.
moregan
unread,
Feb 27, 2012, 2:10:30 PM2/27/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message