exceptions in Mech

Gedanken <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.lwp
Message-ID <[email protected]>
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 ($@) {
             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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.