summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authordoy <doy@tozt.net>2009-04-14 00:08:22 -0500
committerdoy <doy@tozt.net>2009-04-14 00:08:22 -0500
commitcc0cc84d8563e2b801926e9a34e26dd5fd81810f (patch)
treec95e47e9d8e4c7c03cddb6cfca6bd452cf9fd2fe /lib
parent1bc466ec9fdeb4ba4df5d13b2c8cf03d156641fe (diff)
downloadmoosex-nonmoose-cc0cc84d8563e2b801926e9a34e26dd5fd81810f.tar.gz
moosex-nonmoose-cc0cc84d8563e2b801926e9a34e26dd5fd81810f.zip
comment
Diffstat (limited to 'lib')
-rw-r--r--lib/MooseX/NonMoose/Meta/Role/Constructor.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/MooseX/NonMoose/Meta/Role/Constructor.pm b/lib/MooseX/NonMoose/Meta/Role/Constructor.pm
index d2efff1..7f7fd48 100644
--- a/lib/MooseX/NonMoose/Meta/Role/Constructor.pm
+++ b/lib/MooseX/NonMoose/Meta/Role/Constructor.pm
@@ -20,6 +20,9 @@ sub _generate_instance {
my ($var, $class_var) = @_;
my $new = $self->name;
my $super_new_class = $self->associated_metaclass->find_next_method_by_name($new)->package_name;
+ # XXX: this should probably be taking something from the meta-instance api,
+ # rather than calling bless directly, but all it can do at the moment is
+ # generate fresh instances
"my $var = bless $super_new_class->$new(\@_), $class_var;\n";
}