File Coverage

blib/lib/SDL/Config.pm
Criterion Covered Total %
statement 14 14 100.0
branch 2 2 100.0
condition n/a
subroutine 4 4 100.0
pod 0 1 0.0
total 20 21 95.2


line stmt bran cond sub pod time code
1             package SDL::Config;
2              
3 39     39   89305 use strict;
  39         80  
  39         1612  
4 39     39   210 use warnings;
  39         211  
  39         1403  
5 39     39   1250 use SDL::ConfigData;
  39         92  
  39         5661  
6              
7             sub has {
8 67     67 0 51520 my ( $class, $define ) = @_;
9 67         553 my $sdl_config = SDL::ConfigData->config('SDL_cfg');
10 67         1007 my $n = scalar grep { $$sdl_config{$_}{'libs'}{$define} } keys %$sdl_config;
  3484         7850  
11 67 100       5060 return ( $n > 0 ) ? 1 : 0;
12             }
13              
14             1;