use Mouse::Meta::TypeConstraint;
-#use Mouse::Meta::Method::Accessor;
-use Mouse::Meta::Method::Delegation;
-
sub _process_options{
my($class, $name, $args) = @_;
my %handles = $attribute->_canonicalize_handles($attribute->{handles});
my $reader = $attribute->get_read_method_ref;
+ Mouse::Util::load_class($delegation_class);
+
while(my($handle_name, $method_to_call) = each %handles){
my $code = $delegation_class->_generate_delegation($attribute, $metaclass,
$reader, $handle_name, $method_to_call);
use Test::More tests => 10;
{
+ package OtherClass;
+ sub method {}
+
package Class;
use Mouse;
- has foo => (is => 'rw');
+ # this attribute definition is intended to load submodules
+
+ has foo => (
+ is => 'rw',
+ isa => 'OtherClass',
+ handles => qr/./,
+ );
__PACKAGE__->meta->make_immutable; # ensure metaclasses loaded