merge changelog from stable
[gitmo/Moose.git] / benchmarks / method_modifiers.pl
index 2d2986b..16f1c5e 100755 (executable)
@@ -17,7 +17,7 @@
     package CMMChild::Before;
     use Class::Method::Modifiers;
     use base 'PlainParent';
-    
+
     before method => sub { "B" };
 }
 {
@@ -32,7 +32,7 @@
     package CMMChild::Around;
     use Class::Method::Modifiers;
     use base 'PlainParent';
-    
+
     around method => sub { shift->() . "A" };
 }
 {
@@ -47,7 +47,7 @@
     package CMMChild::AllThree;
     use Class::Method::Modifiers;
     use base 'PlainParent';
+
     before method => sub { "B" };
     around method => sub { shift->() . "A" };
     after  method => sub { "Z" };
     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');
+