has 'foo' => (
is => 'bare', # no accessors
init_arg => undef, # no longer accessible via constructor
);
####
# One reasonable constructor interface for a square:
Square->new( center => [ $x, $y ], width => $w );
##
##
package Square;
use Moose;
has 'top_left' => ( init_arg => undef, accessor => '_top_left' );
has 'top_right' => ( init_arg => undef, accessor => '_top_right' );
has 'bottom_left' => ( init_arg => undef, accessor => '_bottom_left' );
has 'bottom_right' => ( init_arg => undef, accessor => '_bottom_right' );
sub BUILD {
my ($self, $params) = @_;
my $center = $params->{center};
my $width = $params->{width};
$self->_construct_coordinates_from_center_and_width( $center, $width );
}