I tried your code, and it seems to work until you press a key.
Then it complains: Tool::Font::print requires a SDL::Surface, that could be found on CPAN.
Some issues, i had to copy my ttf to the same folder as the test-script, and call it like -ttfont=>"Arial.ttf"
you might have a look at:
SDL::Tutorial to get it to work (see example below)
#!/usr/bin/perl
use SDL::App;
use SDL::Rect;
use SDL::Color;
use SDL::Event;
use SDL::Constants;
use SDL::Tool::Font;
my $app = SDL::App->new(
-width => 640,
-height => 480,
-depth => 16,
-title => "My HelloWold Killer APP",
);
my $rect = SDL::Rect->new(
-height => 100,
-width => 100,
-x => 270,
-y => 390,
);
my $color = SDL::Color->new(
-r => 0x00,
-g => 0x00,
-b => 0xff,
);
$app->fill( $rect, $color );
$app->update( $rect );
my $f = SDL::Tool::Font->new( -ttfont=>"Arial.ttf", );
my %actions = (
SDL_QUIT() => sub { exit(0); },
# SDL_KEYDOWN() => sub { $f->print ($rect, 0, 0, "Key Pressed"); },
);
$app->loop(\%actions);