backwards compatibility with perl5.10 and perl5.12