Skip Menu |

This queue is for tickets about the SDL_perl CPAN distribution.

Report information
The Basics
Id: 47893
Status: resolved
Priority: 0/
Queue: SDL_perl

People
Owner: Nobody in particular
Requestors: JWILLIAMS [...] cpan.org
Cc: smailliw [...] gmail.com
AdminCc:

Bug Information
Severity: Normal
Broken in: 2.1.3
Fixed in: (no value)



CC: smailliw [...] gmail.com
Subject: spurious error: "Tool::Font::print requires a SDL::Surface"
I got an error trying to run test/testfonttool.pl, and narrowed it down to a logic error in SDL::Tool::Font. Why would we want to throw an error just because $SDL::DEBUG was not set? I have attached one way to fix it.
Subject: sdl-tool-font.patch
--- lib/SDL/Tool/Font.pm 2009/07/15 01:40:00 1.1 +++ lib/SDL/Tool/Font.pm 2009/07/15 01:40:22 @@ -46,7 +46,7 @@ sub print { my ($self,$surface,$x,$y,@text) = @_; die "Tool::Font::print requires a SDL::Surface\n" - unless ($SDL::DEBUG && $surface->isa('SDL::Surface')); + unless $surface->isa('SDL::Surface'); if ($$self{-font}->isa('SDL::Font')) { $$self{-font}->use(); SDL::SFont::PutString( $$surface, $x, $y, join('',@text));
On Tue Jul 14 21:49:35 2009, JWILLIAMS wrote: Show quoted text
> I got an error trying to run test/testfonttool.pl, and narrowed it down > to a logic error in SDL::Tool::Font. Why would we want to throw an > error just because $SDL::DEBUG was not set? > > I have attached one way to fix it.
Please verify. Fixed in v2.2.1 at http://github.com/kthakore/SDL_Perl Will be on CPAN soon!
Yes, I can verify it works for me. Thanks!