#!/usr/bin/perl
while (<>){
chomp;
print;
eval{
local $SIG{ALARM} = sub{die "\n"};
alarm 3;
print " ",$1 if `bpcoverage -c $_`=~/(VERSION:.*)/;
alarm 0;
};
alarm 0;
next if $@;
}
after scratching my head for a while, I decided to add use warnings and strict then I got the complains that $SIG{ALARM} is unregistered signal. ARGH!! how stupid.. should have used $SIG{ALRM}
now I am going to start using strict and warnings no matter the lenght of the script!!
another reason why you should always use warnings 0 Comments More | Login | Reply /