schwern/Mite — Issue #7: Implement optimized read only attributes
Author: schwern
Created: 2011-12-09 18:30:45+00:00
State: open
Labels: Feature

A read only attribute should compile down to something like:

sub name {
croak "name() is read-only" if @_ > 1;
return $_[0]->{name};
}