9 use Moose::Meta::Class;
11 my $meta = Moose::Meta::Class->create('Banana');
14 $SIG{__WARN__} = sub { $warn = "@_" };
16 $meta->add_attribute('foo');
17 like $warn, qr/Attribute \(foo\) of class Banana has no associated methods/,
18 'correct error message';
21 $meta->add_attribute('bar', is => 'bare');
22 is $warn, '', 'add attribute with no methods and is => "bare"';