- or download this
has 'foo' => (
is => 'bare', # no accessors
init_arg => undef, # no longer accessible via constructor
);
- or download this
# One reasonable constructor interface for a square:
Square->new( center => [ $x, $y ], width => $w );
- or download this
package Square;
use Moose;
...
my $width = $params->{width};
$self->_construct_coordinates_from_center_and_width( $center, $wid
+th );
}