2 # This is automatically generated by author/import-moose-test.pl.
3 # DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
4 use t::lib::MooseCompat;
19 # Assigning types to these non-alpha attrs exposed a bug in Mouse.
23 reader => 'get_at_type',
24 writer => 'set_at_type',
44 ok( Foo->meta->has_attribute($_), "Foo has '$_' attribute" )
45 for 'type', '@type', 'has spaces';
47 my $foo = Foo->new( '!req' => 42 );
49 is( $foo->get_type, 1, q{'type' attribute default is 1} );
50 is( $foo->get_at_type, 'at type', q{'@type' attribute default is 1} );
51 is( $foo->get_hs, 42, q{'has spaces' attribute default is 42} );
60 isa_ok( $foo, 'Foo' );
61 is( $foo->get_at_type, 'bar', q{reader for '@type'} );
62 is( $foo->get_hs, 200, q{reader for 'has spaces'} );
64 $foo->set_at_type(99);
65 is( $foo->get_at_type, 99, q{writer for '@type' worked} );