use correct metaclass when applying roles to instances
authorJonathan Rockway <jon@jrock.us>
Tue, 13 May 2008 08:17:15 +0000 (08:17 +0000)
committerJonathan Rockway <jon@jrock.us>
Tue, 13 May 2008 08:17:15 +0000 (08:17 +0000)
commitc87f0c7f501b1487299a59cb1dbe5297c6462537
tree00c322d94a2d9424ddde8da6dacf7b16773b3289
parent1a28289deb58b4641a9a7911dc92411dbae65be5
use correct metaclass when applying roles to instances

Instead of always applying the role with Moose::Meta::Object,
determine the object's metaclass and use that to apply the role.  This
makes it possible to apply roles to instances of classes that have a
custom metaclass.
lib/Moose/Meta/Role/Application/ToInstance.pm