Re: Win32::OLE::Variant, perl crashing.

2006-05-07 Thread A. Pollock
Thanks Luke, SUPER. That's the one I was thinking about. Much better than nesting every last single call to Date() in an ungainly if/else statement. - Original Message - From: Luke Bakken [EMAIL PROTECTED] To: perl-win32-users@listserv.ActiveState.com Subject: Re: Win32::OLE

Re: Win32::OLE::Variant, perl crashing.

2006-05-06 Thread A. Pollock
Sure. if (ref ($sentdate) eq 'Win32::OLE::Variant') { # something with $sentdate-Date } else { # assume $sentdate is a string. } There might be something more efficient one can do with SUPER or AUTOLOAD or something. I've never had the time to figure it out though. - Original

Re: Win32::OLE::Variant, perl crashing.

2006-05-06 Thread Luke Bakken
if (ref ($sentdate) eq 'Win32::OLE::Variant') { # something with $sentdate-Date } else { # assume $sentdate is a string. } Best practice is to use UNIVERSAL::isa() : if (UNIVERSAL::isa($sentdate, 'Win32::OLE::Variant')) { } else { } Tested with: perl -MWin32::OLE::Variant

RE: Win32::OLE::Variant, perl crashing.

2006-05-05 Thread Timothy Johnson
Title: Win32::OLE::Variant, perl crashing. Not sure off the top of my head. Is there any way you could post some example code? From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Satish Kaushik Sent: Friday, May 05, 2006 12:24 PM To:

RE: Win32::OLE::Variant, perl crashing.

2006-05-05 Thread Satish Kaushik
t;."GMT";}else{undef $sentdate;}return $sentdate; } Regards Satish From: Timothy Johnson [mailto:[EMAIL PROTECTED] Sent: Friday, May 05, 2006 2:23 PMTo: [EMAIL PROTECTED]; perl-win32-users@listserv.ActiveState.comSubject: RE: Win32::OLE::Variant, perl crashing. Not sure off the top