On Tue, Nov 03, 2009 at 05:21:12PM -0600, Evan Carroll wrote: > perl -Moose -e'has q[format_feed]=> ( isa => "Str", is => "ro" ); > print Class->new->meta->get_attribute(q[format_feed])->get_value()'
get_value and set_value both require the instance as the first argument, as pointed out in the docs for Class::MOP::Attribute. The attribute object doesn't have a value itself, since it's part of the class... you have to tell it which instance you want to get the value from. my $obj = Class->new; $obj->meta->get_attribute('foo')->get_value($obj); -doy