Help for this page

Select Code to Download


  1. or download this
    package Attack {
        use Moo;
    ...
        has damage => ( is => 'ro', isa => Int );
        has speed  => ( is => 'ro', isa => Int );
    }
    
  2. or download this
        sub light {
            my $self = shift;
    ...
            );
        }
    
  3. or download this
        sub BUILDARGS {
            my ($self, @args) = @_;
    ...
                return { @args };
            }
        }
    
  4. or download this
    my $att1 = Attack->heavy;
    
  5. or download this
    my $att2 = Attack->new('heavy');