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, $sentdate );
 
 $sentvariant = $inputvar;
 $senton = 'Thu, 01 Jan 1970 00:00:00 GMT'; #default date

  if($sentvariant && ($sentvariant =~m/[0-9]+/)){
   $sentdate = $sentvariant->Date(LOCALE_NOUSEROVERRIDE|DATE_SHORTDATE)." ".$sentvariant->Time(TIME_FORCE24HOURFORMAT|TIME_NOTIMEMARKER)." "."GMT";
  }else{
   undef $sentdate;
  }
return $sentdate;
}
 
Regards
Satish
 


From: Timothy Johnson [mailto:[EMAIL PROTECTED]
Sent: Friday, May 05, 2006 2:23 PM
To: [EMAIL PROTECTED]; [email protected]
Subject: RE: 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: [email protected]
Subject: 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, it crashed.

        Is there any way to identify whether date is a Variant or a simple String?
I would be really thankful if anyone suggests some thing,

Thanks & Regards
Satish

_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to