From: gfx Date: Wed, 15 Jul 2009 04:17:56 +0000 (+0900) Subject: Extend bench/loading-benchmark.pl X-Git-Tag: 0.90~21 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6f219abc79a2306a84bf335245ebbdf33cf9c107;p=gitmo%2FClass-MOP.git Extend bench/loading-benchmark.pl Usage: perl loading-benchmark.pl [count] [module] --- diff --git a/bench/loading-benchmark.pl b/bench/loading-benchmark.pl index 0800739..2994f6c 100755 --- a/bench/loading-benchmark.pl +++ b/bench/loading-benchmark.pl @@ -2,9 +2,11 @@ use strict; use Benchmark qw(:all); -my $module = 'Moose'; +my($count, $module) = @ARGV; +$count ||= 10; +$module ||= 'Moose'; -cmpthese timethese 10 => { +cmpthese timethese $count => { released => sub { system( $^X, '-e', "require $module" ) == 0 or die; },