From: Peter Rabbitson Date: Wed, 10 Nov 2010 04:34:24 +0000 (+0100) Subject: Now --run works X-Git-Tag: 0.009001~43 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4ce62c033ee50b44a0b25c41596edb49d7007aa7;p=gitmo%2FMoo.git Now --run works --- diff --git a/benchmark/class_factory b/benchmark/class_factory index 8f60bf2..a168a6b 100644 --- a/benchmark/class_factory +++ b/benchmark/class_factory @@ -120,8 +120,8 @@ sub _add_moosey_has { unless $opts->{unique}; if ($opts->{run}) { - $perl .= 'package main;'; - $perl .= "our \$foo = $class->$_; $class->$_(1); our \$foo = $class->$_;" + $perl .= "\$::obj = $class->new;"; + $perl .= "\$::foo = \$::obj->$_; \$::obj->$_(1); \$::foo = \$::obj->$_;" for @attr_names; } }