Hi Andy, Thanks for the reply.
Well, for example a peice of code:
$mech->get('http://www.mywebsite.com');
$mech->click("non-existant");
print "form submit failed!", $mech->response->status_line, "\n" unless
$mech->success;
Why does it always die with:
No clickable input with name non-existant at
/usr/lib/perl5/site_perl/5.8.0/WWW/Mechanize.pm line 619
instead of:
form submit failed!
I can't have the application just die.. I need to to just accept the
error, print a message, and keep moving.
What can I do to correct this?
Thanks alot!
-c
> -----Original Message-----
> From: Andy Lester [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, December 02, 2003 10:00 AM
> To: Chris
> Cc: [EMAIL PROTECTED]
> Subject: Re: Mechanize odd make request errors..
>
>
> > Every once in awhile at random times my bot dies with the following:
> >
> > Can't call method "make_request" on an undefined value at
> > /usr/lib/perl5/site_perl/5.8.0/WWW/Mechanize.pm line 636.
>
> It's hard to tell without seeing the actual code, but I'm guessing that
> somewhere in there you've got a click() or a get() that you're not
> checking for success(), and the state of the Mech is no longer
> meaningful for doing other things.
>
> Rule #1 in Mech is always check your return codes.
>
> Rule #1a in Mech is if you're not going to check your return codes, turn
> on autocheck in the constructor to check your return codes for you.
>
> xoa
>
> --
> Andy Lester => [EMAIL PROTECTED] => www.petdance.com => AIM:petdance
smime.p7s
Description: S/MIME cryptographic signature
