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
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
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
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:
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