From: Kartik Thakore Date: Mon, 10 Aug 2009 10:01:57 +0000 (-0400) Subject: fix on return value for sdl functions in Utility X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=841f9cc50c10a19dd2a191e5e41b10bb3d8115e5;p=sdlgit%2FSDL_perl.git fix on return value for sdl functions in Utility --- diff --git a/Build.PL b/Build.PL index f2d146d..4774a76 100644 --- a/Build.PL +++ b/Build.PL @@ -144,6 +144,5 @@ $build->set_flags( $sdl_compile_flags, $sdl_link_flags, ); - # now we're ready to go! $build->create_build_script(); diff --git a/make/lib/SDL/Utility.pm b/make/lib/SDL/Utility.pm index 425884b..9b4c8fe 100644 --- a/make/lib/SDL/Utility.pm +++ b/make/lib/SDL/Utility.pm @@ -19,8 +19,8 @@ use SDL::Build; sub sdl_con_found { `sdl-config --libs`; - return 0 if ($? >> 8); - return 1; + return 1 unless ($? >> 8) and return 0; + } #This should check if the folder actually has the SDL files @@ -34,7 +34,8 @@ sub sdl_libs if(sdl_con_found) { local $_ = `sdl-config --libs`; - return chomp($_); + chomp($_); + return $_; } elsif( check_sdl_dir() ) { @@ -53,7 +54,8 @@ sub sdl_c_flags if(sdl_con_found) { local $_ = `sdl-config --cflags`; - return chomp($_); + chomp($_); + return $_; } elsif ( check_sdl_dir() ) {