1 ## name No builder method
12 #-----------------------------------------------------------------------------
14 ## name Private builder method
23 builder => '_build_attr',
26 #-----------------------------------------------------------------------------
28 ## name Public builder method
37 builder => 'build_attr',
40 #-----------------------------------------------------------------------------
42 ## name Public builder method, declared dynamically
49 __PACKAGE__->meta->add_attribute(attr => (
51 builder => 'build_attr',
54 #-----------------------------------------------------------------------------
56 ## name Public builder method, named dynamically
63 my $builder = 'build_' . rand;
64 __PACKAGE__->meta->add_attribute(attr => (
69 #-----------------------------------------------------------------------------
71 ## name Role sans builder
82 #-----------------------------------------------------------------------------
84 ## name Role with private builder
93 builder => '_build_attr',
96 #-----------------------------------------------------------------------------
98 ## name Role with public builder
107 builder => 'build_attr',
110 #-----------------------------------------------------------------------------
112 ## name Public role builder method, named dynamically
119 my $builder = 'build_' . rand;
120 __PACKAGE__->meta->add_attribute(attr => (
125 #-----------------------------------------------------------------------------
139 #-----------------------------------------------------------------------------
146 Class::MOP::Class->create_anon_class(
148 Class::MOP::Attribute->new(
150 builder => "build_foo_$_",