Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Benchmark cmpthese() removing '.' char from input param

by 1nickt (Canon)
on Mar 12, 2016 at 16:07 UTC ( [id://1157559]=note: print w/replies, xml ) Need Help??


in reply to Benchmark cmpthese() removing '.' char from input param

Hi stevieb, that's odd!

Same results here on 5.22 and 5.8.8 under darwin. It seems to be an issue with variable interpolation by Benchmark:

use strict; use warnings; use Benchmark qw(:all); cmpthese( 1, { p_read => "p_read('a.txt')", }); sub p_read { my $fname = shift; print "$fname\n"; } __END__
Output:
a.txt ...

The way forward always starts with a minimal test.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1157559]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2024-04-24 18:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found