oop( \%actions ) SDLx::App::loop is a simple event loop method which takes a reference to a hash of event handler subroutines. The keys of the hash must be SDL event types such as SDL_QUIT(), SDL_KEYDOWN(), and the like. When called, the event method recieves as its parameter the event object used in the loop. Example: my $app = SDLx::App->new( title => "test.app", width => 800, height => 600, depth => 32 ); my %actions = ( SDL_QUIT() => sub { exit(0); }, SDL_KEYDOWN() => sub { print "Key Pressed" }, ); $app->loop( \%actions );