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