Add installing around to the method-modifier benchmark
Shawn M Moore [Tue, 17 Jun 2008 02:35:43 +0000 (02:35 +0000)]
benchmarks/method_modifiers.pl

index 2d2986b..8193298 100755 (executable)
     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');
+