I feel like I'm asking a dumb question.... but is 'alarm' implemented under Win32 in ActiveState Perl 5.8.8 build 817?

When I try to use the alarm function from Time::HiRes, I receive the following...

Time::HiRes::alarm(): unimplemented in this platform at pmpmark.pl line 112.
        ...propagated at pmpmark.pl line 117.


When I use the built-in alarm function (not from Time::HiRes), it just doesn't seem to work.

        eval {
                local $SIG{ALRM} = sub { die "alarm\n" }; # NB: \n required
                alarm(30);
                $loginseconds = ClickFormButton('Submit');  #OLE call to IE
                alarm(0);
      };
      if ($@) {
              die unless $@ eq "alarm\n";   # propagate unexpected errors
                # timed out
               
                print "login timeout\n";
                #  more stuff
        }

The ActivePerl documentation says that alarm is unimplemented which would explain why it doesn't work.

But I think I've seen / used Perl modules under Win32 that implement a timeout function...

But this 2+ year old message to / from perl5-porters seems to indicate that alarm is implemented under ActiveState Perl 5.8 and above.

http://aspn.activestate.com/ASPN/Mail/Message/perl5-porters/1915044

And then I found this from Jan Dubois from 3+ years ago.  So maybe alarm minimally works -- but it won't break out of an Win32 OLE call...

http://aspn.activestate.com/ASPN/Mail/Message/perl-win32-users/1547759


So maybe the better question is:  Is there anyway to implement an alarm like function under Win32 that will break out of a long running Win32 OLE call?


Regards,

... Dewey
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to