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   29473 use strict;
  39         44  
  39         1120  
4 39     39   130 use warnings;
  39         39  
  39         911  
5 39     39   708 use SDL::ConfigData;
  39         42  
  39         2917  
6              
7             sub has {
8 67     67 0 29947 my ( $class, $define ) = @_;
9 67         216 my $sdl_config = SDL::ConfigData->config('SDL_cfg');
10 67         476 my $n = scalar grep { $$sdl_config{$_}{'libs'}{$define} } keys %$sdl_config;
  3484         3989  
11 67 100       408 return ( $n > 0 ) ? 1 : 0;
12             }
13              
14             1;