From: Shawn M Moore Date: Tue, 17 Jun 2008 02:35:43 +0000 (+0000) Subject: Add installing around to the method-modifier benchmark X-Git-Tag: 0_55~109 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b15a40687b436ec547ddac78ab9dd335786e3c2c;p=gitmo%2FMoose.git Add installing around to the method-modifier benchmark --- diff --git a/benchmarks/method_modifiers.pl b/benchmarks/method_modifiers.pl index 2d2986b..8193298 100755 --- a/benchmarks/method_modifiers.pl +++ b/benchmarks/method_modifiers.pl @@ -61,6 +61,16 @@ around method => sub { shift->() . "A" }; after method => sub { "Z" }; } +{ + package CMM::Install; + use Class::Method::Modifiers; + use base 'PlainParent'; +} +{ + package Moose::Install; + use Moose; + extends 'MooseParent'; +} use Benchmark qw(cmpthese); use Benchmark ':hireswallclock'; @@ -93,3 +103,15 @@ cmpthese($rounds, { ClassMethodModifiers => sub { $cmm_allthree->method() }, }, 'noc'); +print "\nINSTALL AROUND\n"; +cmpthese($rounds, { + Moose => sub { + package Moose::Install; + Moose::Install::around(method => sub {}); + }, + ClassMethodModifiers => sub { + package CMM::Install; + CMM::Install::around(method => sub {}); + }, +}, 'noc'); +