Using die in perl module


Hi all,

I would like to know the consequence in using alarm and die in a
For example consider this

The blocking code is the following

$image= new Image::Magick;

Sometimes this code can hold all resources and normal requests cannot be

So if I follow the example from mod_perl and die in 2 seconds, what will
the consequence to the current requests?

my $timeout = 2; # seconds
eval {
local $SIG{ALRM} =
sub { die “Sorry, timed out. Please try again\n” };
alarm $timeout;

the operation listed above

alarm 0;

die $@ if $@;