exceptions in Mech

How can i prevent mechanize from catching exceptions and grab them myself?
For example, when I try to trap an exception a la

eval {
$agent->form(1);
};
if ($ [at] ) {
print "Yikes, we cant find the form on page: \n\n " .
$agent->content . "\n\n";
}

The Yikes will never execute, but instead I always see

There is no form numbered 1 at
/usr/foo/bar/src/lib/Stuff.pm line 428

and the program dies immediately.

PS Mechanize is the greatest thing ever written

--
gedanken
gedanken [ Di, 08 November 2005 20:36 ] [ ID #1049256 ]
Perl » perl.libwww » exceptions in Mech

Vorheriges Thema: follow location
Nächstes Thema: [Crypt::SSLeay] make test problems on Liunux