Improve profiling script. Type "perl bench/profile.pl" and nytprof-$branch will be...
[gitmo/Class-MOP.git] / bench / foo.pl
diff --git a/bench/foo.pl b/bench/foo.pl
new file mode 100755 (executable)
index 0000000..a2c799a
--- /dev/null
@@ -0,0 +1,66 @@
+#!perl
+# a moose using script for profiling
+# Usage: perl bench/profile.pl
+
+package Foo;
+use Moose;
+
+has aaa => (
+       is => 'rw',
+       isa => 'Str',
+);
+
+has bbb => (
+       is => 'rw',
+       isa => 'Str',
+);
+
+has ccc => (
+       is => 'rw',
+       isa => 'Str',
+);
+
+has ddd => (
+       is => 'rw',
+       isa => 'Str',
+);
+
+has eee => (
+       is => 'rw',
+       isa => 'Str',
+);
+
+__PACKAGE__->meta->make_immutable();
+
+
+package Bar;
+use Moose;
+
+extends 'Foo';
+
+has xaaa => (
+       is => 'rw',
+       isa => 'Str',
+);
+
+has xbbb => (
+       is => 'rw',
+       isa => 'Str',
+);
+
+has xccc => (
+       is => 'rw',
+       isa => 'Str',
+);
+
+has xddd => (
+       is => 'rw',
+       isa => 'Str',
+);
+
+has xeee => (
+       is => 'rw',
+       isa => 'Str',
+);
+
+__PACKAGE__->meta->make_immutable();