::Variant, perl crashing.
Date: Sat, 6 May 2006 14:34:35 -0700
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
Message -
From: Satish Kaushik [EMAIL PROTECTED]
To: perl-win32-users@listserv.ActiveState.com
Subject: Win32::OLE::Variant, perl crashing.
Date: Fri, 5 May 2006 12:24:17 -0700
Hi Everyone,
I am using this module for the dates. While testing I came acorss
one date which
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.
Hi Everyone,
I am using this module for the dates. While testing I came acorss one date which was not a Variant, PERL died saying can't call 'Date' method . I tried to get the 'Type' from the string but again since given string is not a 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:
perl-win32-users
Title: Win32::OLE::Variant, perl crashing.
Hi
Timothy,
Thanks for your response. This is a subroutine, where I am
getting this problem while accessing Date method.
sub
process_date_variant{my $inputvar =shift;
my $sentvariant =
Variant(VT_DATE,'Jan 1, 1970 3:00 pm');my($convertdate