Permalink
Browse files

fix on return value for sdl functions in Utility

  • Loading branch information...
1 parent 7fd8a60 commit 841f9cc50c10a19dd2a191e5e41b10bb3d8115e5 @kthakore kthakore committed Aug 10, 2009
Showing with 6 additions and 5 deletions.
  1. +0 −1 Build.PL
  2. +6 −4 make/lib/SDL/Utility.pm
View
@@ -144,6 +144,5 @@ $build->set_flags(
$sdl_compile_flags,
$sdl_link_flags,
);
-
# now we're ready to go!
$build->create_build_script();
View
@@ -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() )
{

0 comments on commit 841f9cc

Please sign in to comment.