return $instance;
}
-sub attribute_metaclass { 'InsideOutClass::Attribute' }
-
package # hide the package from PAUSE
InsideOutClass::Attribute;
package Foo;
- sub meta { InsideOutClass->initialize($_[0]) }
+ sub meta {
+ InsideOutClass->initialize($_[0] => (
+ # tell our metaclass to use the
+ # InsideOut attribute metclass
+ # to construct all it's attributes
+ ':attribute_metaclass' => 'InsideOutClass::Attribute'
+ ))
+ }
__PACKAGE__->meta->add_attribute('foo' => (
reader => 'get_foo',