- or download this
package Enemy {
use Moo::Role;
...
# Creating lots of classes doesn't have to be painful.
package Rat { use Moo; with 'Enemy' }
package Cat { use Moo; with 'Enemy' }
- or download this
use Moops;
...
class Rat with Enemy;
class Cat with Enemy;
- or download this
use Moops;
...
$target->is_sinful ? Attack->heavy : Attack->light;
}
}