our $is_magick = 0; eval 'require GD'; if ($@) { # problems with GD, fall back to non-GD } else { # we have GD, go for it! $is_magick = 1; }