The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Stuff::Object - Object class with attributes

SYNOPSIS

  package Person;
  use Stuff -Object;
  
  has -age;
  has mood => 'Good!';
  
  say Person->new( age => 28 )->age;
  say Person->new->age( 28 )->age;
  say Person->new->mood;
  say Person->new( mood => 'Boring' )->mood;

METHODS

new

  $package->new;
  $package->new( \%attrs );
  $package->new( %attrs );

define_attr

has

AUTHOR

Nikita Zubkov <nikzubkov@gmail.com>.