| 1 | use parent 'Action'; | ||
| 2 | |||
| 3 | ### An Action on which you hit with a functor such as in Action.pm | ||
| 4 | |||
| 5 | sub new { | ||
| 6 | my $class = shift; | ||
| 7 | |||
| 8 | $self = $class->SUPER::new(@_); | ||
| 9 | |||
| 10 | bless $self, $class; | ||
| 11 | }; | ||
| 12 | |||
| 13 | sub doHit { | ||
| 14 | $self = shift; | ||
| 15 | |||
| 16 | $self->{hitmethod}->do(@_); | ||
| 17 | }; | ||
| 18 | |||
| 19 | 1; | ||
| 20 |