In dealing with COM objects, often undef is returned if something goes wrong.

I currently have code which looks like this:

...
SomeCOMTHING -> callthis() || die "this failed"
SomeCOMTHING -> callthat() || die "that failed"
...

As you can imagine the code looks ugly and is annoying to code.

Is there anything in Perl like a C++ try/catch block or some other way to say

"If anything in the following code return undef() die"

The best thought I've had so far is to pass the statements as strings to a 
routine that does an eval() and then error recovery, but this seems overly 
complicated.  (Plus it means I won't get syntax checking until Run Time!)

I looked at signals, but nothing seems to fit . . .

Any ideas what else to look at?

Frank


---
You are currently subscribed to perl-win32-users as: [archive@jab.org]
To unsubscribe, forward this message to
         [EMAIL PROTECTED]
For non-automated Mailing List support, send email to  
         [EMAIL PROTECTED]

Reply via email to