From: gfx Date: Thu, 1 Oct 2009 06:26:43 +0000 (+0900) Subject: Add a benchmark for load_class() X-Git-Tag: 0.37_01~3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=dd2d7f1ac8669339759624c875ce997ca26bd64f;p=gitmo%2FMouse.git Add a benchmark for load_class() --- diff --git a/benchmarks/load_class.pl b/benchmarks/load_class.pl new file mode 100755 index 0000000..1c11228 --- /dev/null +++ b/benchmarks/load_class.pl @@ -0,0 +1,19 @@ +#!perl +use strict; +use warnings; +use Benchmark qw/cmpthese/; + +use Class::MOP; +use Mouse(); + +print "Class::MOP $Class::MOP::VERSION\n"; +print "Mouse $Mouse::VERSION\n"; + +cmpthese -1 => { + 'Class::MOP::load_class' => sub{ + Class::MOP::load_class('Class::MOP::Class'); + }, + 'Mouse::Util::load_class' => sub{ + Mouse::Util::load_class('Class::MOP::Class'); + }, +};