- or download this
use strict;
...
use Digest::MD5;
use Time::HiRes;
- or download this
# prepare thread pool
my $pool = Thread::Pool::Simple->new(
...
do => [\&parse_artifact]
) || print "couldn't create thread pool: $!\n";;
- or download this
# load all format files
eval
...
require $format_dir . '/' . $formats{$_}->{'file'};
}
};
- or download this
# now we need to recursively go through every file and directory in th
+at we got provided as an input and verify if we can parse it (and the
+n parse the file)
parse_dir( $dir );
- or download this
# wait for thread pool to empty
$pool->join();
- or download this
# we have the artifact here, it's verified so we just need to parse it
sub parse_artifact()
...
# load the log file (prepare, action provided here depends on
+the format in question)
print "parse_artifact fired; format passed is: $format->{'name
+'}; file passed is $file\n";