</pre>
<p>and then be sure to create an event object amongst the animation initialization code:</p>
-<pre> my $event = new SDL::Event;
+<pre> my $event = SDL::Event->new;
</pre>
<p>Finally, we need to update the application loop so that it examines and responds to events. Replace the current application loop with this code:</p>
my $bg = SDL::Rect->new( 0,0,$side_length, $side_length, );
# event listener
- my $event = new SDL::Event->new();
+ my $event = SDL::Event->new();
# event dispatch table
my $keyname_dispatch_table = {