16 # Assigning types to these non-alpha attrs exposed a bug in Moose.
20 reader => 'get_at_type',
21 writer => 'set_at_type',
41 ok( Foo->meta->has_attribute($_), "Foo has '$_' attribute" )
42 for 'type', '@type', 'has spaces';
44 my $foo = Foo->new( '!req' => 42 );
46 is( $foo->get_type, 1, q{'type' attribute default is 1} );
47 is( $foo->get_at_type, 'at type', q{'@type' attribute default is 1} );
48 is( $foo->get_hs, 42, q{'has spaces' attribute default is 42} );
57 isa_ok( $foo, 'Foo' );
58 is( $foo->get_at_type, 'bar', q{reader for '@type'} );
59 is( $foo->get_hs, 200, q{reader for 'has spaces'} );
61 $foo->set_at_type(99);
62 is( $foo->get_at_type, 99, q{writer for '@type' worked} );