Extend bench/loading-benchmark.pl
[gitmo/Class-MOP.git] / bench / loading-benchmark.pl
1 #!perl -w
2 use strict;
3 use Benchmark qw(:all);
4
5 my($count, $module) = @ARGV;
6 $count  ||= 10;
7 $module ||= 'Moose';
8
9 cmpthese timethese $count => {
10     released => sub {
11         system( $^X, '-e', "require $module" ) == 0 or die;
12     },
13     blead => sub {
14         system( $^X, '-Iblib/lib', '-Iblib/arch', '-e', "require $module" )
15             == 0
16             or die;
17     },
18 };