App-cloc

 view release on metacpan or  search on metacpan

bin/cloc  view on Meta::CPAN

5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
            unshift @args, $file;
        }
#use Data::Dumper;
#print "\ncall_string=", Dumper($call_string);
#print "args=\n";
#print Dumper(\@args);
#print "lines before=\n";
#print Dumper(\@lines);
 
        # Unusual inputs, namely /* within strings without
        # a corresponding */ can cause huge delays so put a timer on this.
        my $max_duration_sec = scalar(@lines)/1000.0; # est lines per second
           $max_duration_sec = 1.0 if $max_duration_sec < 1;
#print "max_duration_sec=$max_duration_sec\n";
        eval {
            local $SIG{ALRM} = sub { die "alarm\n" };
            alarm $max_duration_sec;
            no strict 'refs';
            @lines = &{$subroutine}(\@lines, @args);   # apply filter...
            alarm 0;
        };



( run in 0.280 second using v1.01-cache-2.11-cpan-e5176c747c2 )