You have to pass the parameters from the callback to your method, something like:
$app->add_move_handler ( sub { $ship->move( @_ ) } ); $app->add_show_handler ( sub { $ship->draw( @_ ) } );
Improve your skills with Modern Perl: the free book.
In reply to Re: SDLx handlers and Moose
by chromatic
in thread SDLx handlers and Moose
by Ransom
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |