[  date  ] 2004/02/23 | Monday | 08:00 PM
[ author ] David J. Goehrig <[EMAIL PROTECTED]> 

> HOW TO USE SDL::Config IN YOUR PROGRAMS

The has() method in this release has a bug.

Here's how it looks right now:

    sub has
    {
            my ($class, $define) = @_;
            scalar grep { exists $$sdl_config{$_}{$define} } keys %$sdl_config;
    }

Unfortunately, even if certain attributes are set to 0,
the existence check still passes.  For example, I don't
have SDL_ttf on my system, and the $sdl_config hashref
knows this.  However, 
         
    SDL::Config->has('SDL_ttf')

returns 1;

Get rid of "exists" and it'll work as advertised.


Reply via email to