While doing a benchmark between a C implementation of some file work to a pure Perl implementation, I found what I think might be an issue in Benchmark cmpthese, whereby it seems to remove a . character from input param to the subs being tested.
Here's an extremely minimalistic version that demonstrates the issue:
use warnings;
use strict;
use Benchmark qw(:all);
my $fname = 'a.txt';
cmpthese( 1, {
p_read => "p_read($fname)",
});
sub p_read {
my $fname = shift;
print "$fname\n";
}
__END__
atxt
# cmpthese output redacted
This happens with Benchmark v1.12 on perl v5.14.4 and Benchmark v1.2 on perl v5.22.1.
Have I overlooked something in the docs perhaps that anyone knows about?