Help for this page

Select Code to Download


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