jiwei800715 has asked for the wisdom of the Perl Monks concerning the following question:

I have a program that request data from remote server by a COM, I use Win32::OLE to call method in COM,
eval{ $obj=Win32::OLE->GetActiveObject("Expert.CoExec"); }; if ($@||Win32::OLE->LastError()) { die "Can not start Expert"; } @temp_array1=$obj->RemoteCallFunc("get_tradedetaile_4P_1_1",Variant(VT +_DATE,$Task_ref->{Date}));
but because calling cross internet, remote server may not response during requesting the mass data. I think what is a better way to do this is a timeout method, but can not find kind of timeout way in win32::ole doc, so any one know how to deal with this problem?

Replies are listed 'Best First'.
Re: win32::OLE timeout problem
by BrowserUk (Patriarch) on Apr 01, 2009 at 10:10 UTC
Re: win32::OLE timeout problem
by Bloodnok (Vicar) on Apr 01, 2009 at 09:26 UTC
    A trivial search on the monastry (using this google search) produced numerous (nearly 3,000) hits related to timeout e.g. here, here & here ... is that so difficult to do yourself before bothering the monks ??

    A user level that continues to overstate my experience :-))
        ...in what way ? The OP appears to have given up on an OLE based solution and was asking for any solution.

        Admittedly, the hints I provided didn't directly answer his question, but there were/are, I believe, several pointers that could be of use...

        A user level that continues to overstate my experience :-))