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   110091 use strict;
  39         104  
  39         1247  
4 39     39   224 use warnings;
  39         82  
  39         1262  
5 39     39   981 use SDL::ConfigData;
  39         82  
  39         4793  
6              
7             our $VERSION = 2.548;
8              
9             sub has {
10 67     67 0 64422 my ( $class, $define ) = @_;
11 67         447 my $sdl_config = SDL::ConfigData->config('SDL_cfg');
12 67         647 my $n = scalar grep { $$sdl_config{$_}{'libs'}{$define} } keys %$sdl_config;
  3484         6751  
13 67 100       1524 return ( $n > 0 ) ? 1 : 0;
14             }
15              
16             1;