dirty heuristics to not be evil
perl 5.8 compat