use if eval { require mod; 1 }, qw' constant haveMod 1 ';