From: Shawn M Moore <sartak@gmail.com>
Date: Sat, 28 Mar 2009 20:17:38 +0000 (-0400)
Subject: Use class_of in attr->clone
X-Git-Tag: 0.73_01~36^2~34
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1d8bd6b490292a50a42077934998a73911b4a29c;p=gitmo%2FMoose.git

Use class_of in attr->clone
---

diff --git a/lib/Moose/Meta/Attribute.pm b/lib/Moose/Meta/Attribute.pm
index 8014232..73b6047 100644
--- a/lib/Moose/Meta/Attribute.pm
+++ b/lib/Moose/Meta/Attribute.pm
@@ -248,7 +248,7 @@ sub clone {
 
     my ( @init, @non_init );
 
-    foreach my $attr ( grep { $_->has_value($self) } $self->meta->compute_all_applicable_attributes ) {
+    foreach my $attr ( grep { $_->has_value($self) } Class::MOP::class_of($self)->compute_all_applicable_attributes ) {
         push @{ $attr->has_init_arg ? \@init : \@non_init }, $attr;
     }