A similar problem exists with apache, as long as the user clicks there stop button.

When running in a CGI environment this turns out not to be the case. Apache can, and will if you tell it, limit the total amount of CPU time a spawned CGI process can take. IIS has a similar setting, I'm sure, and I've no doubt microsoft already has a similar solution. There's nothing for perl to do here.

In a more embedded situation, such as mod_perl under Apache or the IIS equivalent, you don't want perl doing the killing of itself either, as that's not the right thing to do -- you want the interface module (mod_perl or whatever the IIS version is) do handle the timeouts and killing and whatnot. So there's nothing for perl to do there either. (The last thing you want is for something in the guts of the webserver to be dying. That's not good) mod_perl has timeout capabilities already. I have no idea if the IIS plugin for perl does.

Looks like your technical problem is already solved or located somewhere else. If you still think it isn't, here certainly isn't the place to get it fixed -- you need to talk to the perl5-porters list if you're still convinced it's a perl problem, or whoever makes the perl plugin bits for IIS (I presume ActiveState).