From: gfx Date: Thu, 13 Aug 2009 05:26:38 +0000 (+0900) Subject: Enhance bench/loading-benchmark.pl to try to load blead Moose X-Git-Tag: 0.92~8 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=41070b4eebf43492380a31b9fbab69b329cf8616;p=gitmo%2FClass-MOP.git Enhance bench/loading-benchmark.pl to try to load blead Moose --- diff --git a/bench/loading-benchmark.pl b/bench/loading-benchmark.pl index 2994f6c..dc0184c 100755 --- a/bench/loading-benchmark.pl +++ b/bench/loading-benchmark.pl @@ -6,13 +6,21 @@ my($count, $module) = @ARGV; $count ||= 10; $module ||= 'Moose'; +my @blib = qw(-Iblib/lib -Iblib/arch -I../Moose/blib/lib -I../Moose/blib/arch -I../Moose/lib); + +$| = 1; # autoflush + +print 'Installed: '; +system $^X, '-le', 'require Moose; print $INC{q{Moose.pm}}'; + +print 'Blead: '; +system $^X, @blib, '-le', 'require Moose; print $INC{q{Moose.pm}}'; + cmpthese timethese $count => { released => sub { - system( $^X, '-e', "require $module" ) == 0 or die; + system( $^X, '-e', "require $module") == 0 or die; }, blead => sub { - system( $^X, '-Iblib/lib', '-Iblib/arch', '-e', "require $module" ) - == 0 - or die; + system( $^X, @blib, '-e', "require $module") == 0 or die; }, };