[ date ] 2004/02/18 | Wednesday | 07:00 PM [ author ] Tels <[EMAIL PROTECTED]>
> Moin, > > tried it for the first time (I admit :) and run into troubles. My first try as well. :) > Second: > > [EMAIL PROTECTED]:~/perl/game/sdl-perl/SDL_Perl-2.0.5> perl Build.PL > Base class package "Module::Build" is empty. > (Perhaps you need to 'use' the module which defines that package first.) > at make/lib/SDL/Build.pm line 4 > BEGIN failed--compilation aborted at make/lib/SDL/Build.pm line 4. > Compilation failed in require at Build.PL line 7. > BEGIN failed--compilation aborted at Build.PL line 7. I did not get this. `perl Build.PL` worked as expected. > On a different machine with older version already installed I managed, but I > got test-failures in the TTF tests (something about a non-inherited > AUTOLOAD beeing deprecated). I get these, too. I also get this: # Tried to use 'SDL::Tool::Font'. # Error: Can't locate auto/SDL/TTFInit.al in @INC (@INC contains: ... # Compilation failed in require at ../lib/SDL/Tool/Font.pm line 10. # BEGIN failed--compilation aborted at ../lib/SDL/Tool/Font.pm line 10. I imagine this happens, because I don't have SDL_ttf (the C library) installed on my system. SDL::Config seems aware of this fact, so that's good. However, the test cases don't consult SDL::Config on this matter. I've attached a patch to fix this. To apply it, do: cd SDL_Perl-2.0.5 patch -p1 < SDL_ttf_check.patch This patch affects t/ttfontpm.t and t/toolfontpm.t . --beppu PS: Is there a reason the BEGIN blocks in the tests use different formatting compared to the rest of SDL_Perl ? I picked the indent-8-k&r-ish style, because that's what the rest of SDL_Perl uses, but all the other BEGIN blocks use a 2 space indent w/ uncuddled braces on their own line style. I'm not sure I picked the right style, but whatever. Reformat it however you like.
Only in SDL_Perl-2.0.5-beppu/src: SDL diff -r -u SDL_Perl-2.0.5/t/toolfontpm.t SDL_Perl-2.0.5-beppu/t/toolfontpm.t --- SDL_Perl-2.0.5/t/toolfontpm.t 2004-02-06 11:23:08.000000000 -0800 +++ SDL_Perl-2.0.5-beppu/t/toolfontpm.t 2004-02-20 02:35:29.165982880 -0800 @@ -2,16 +2,21 @@ # basic testing of SDL::Tool::Font -use Test::More tests => 2; use strict; use vars qw/@INC/; -BEGIN - { - unshift @INC, ('../lib', '..'); # unfortunately, SDL.pm is not in lib/ - chdir 't' if -d 't'; - use_ok( 'SDL::Tool::Font' ); - } +BEGIN { + use Test::More; + use SDL::Config; + if (SDL::Config->has('SDL_ttf')) { + plan tests => 2; + } else { + plan skip_all => "SDL_ttf not supported\n"; + } + unshift @INC, ( '../lib', '..' ); # unfortunately, SDL.pm is not in lib/ + chdir 't' if -d 't'; + use_ok('SDL::TTFont'); +} can_ok ('SDL::Tool::Font', qw/ new print diff -r -u SDL_Perl-2.0.5/t/ttfontpm.t SDL_Perl-2.0.5-beppu/t/ttfontpm.t --- SDL_Perl-2.0.5/t/ttfontpm.t 2004-02-06 11:23:09.000000000 -0800 +++ SDL_Perl-2.0.5-beppu/t/ttfontpm.t 2004-02-20 02:33:17.158051136 -0800 @@ -2,16 +2,21 @@ # basic testing of SDL::TTFont -use Test::More tests => 2; use strict; use vars qw/@INC/; -BEGIN - { - unshift @INC, ('../lib', '..'); # unfortunately, SDL.pm is not in lib/ - chdir 't' if -d 't'; - use_ok( 'SDL::TTFont' ); - } +BEGIN { + use Test::More; + use SDL::Config; + if (SDL::Config->has('SDL_ttf')) { + plan tests => 2; + } else { + plan skip_all => "SDL_ttf not supported\n"; + } + unshift @INC, ( '../lib', '..' ); # unfortunately, SDL.pm is not in lib/ + chdir 't' if -d 't'; + use_ok('SDL::TTFont'); +} can_ok ('SDL::TTFont', qw/ new print width height