blib/lib/File/MMagic/benchmark.pl untested

filter: Statementstmt 0.0% 0 / 18 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod n/a totaltotal 0.0% 0 / 22 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 use strict;
2 use Benchmark qw(cmpthese);
3 use File::MMagic;
4 use File::MMagic::XS;
5  
6 my $fm = File::MMagic->new();
7 my $fmxs = File::MMagic::XS->new();
8  
9 my $file = shift @ARGV;
10 cmpthese(10_000, {
11 xs => sub { $fmxs->get_mime($file) },
12 perl => sub { $fm->checktype_filename($file) }
13 });