/lib/SDL/Config.pm

http://github.com/PerlGameDev/SDL · Perl · 16 lines · 12 code · 4 blank · 0 comment · 0 complexity · 212e3258bcb0ee70f2037420e94c4da5 MD5 · raw file

  1. package SDL::Config;
  2. use strict;
  3. use warnings;
  4. use SDL::ConfigData;
  5. our $VERSION = 2.548;
  6. sub has {
  7. my ( $class, $define ) = @_;
  8. my $sdl_config = SDL::ConfigData->config('SDL_cfg');
  9. my $n = scalar grep { $$sdl_config{$_}{'libs'}{$define} } keys %$sdl_config;
  10. return ( $n > 0 ) ? 1 : 0;
  11. }
  12. 1;