in reply to Cross-developing in 5.005 and 5.6 (code)

Given that Perl promises backwards but not forwards compatibility, it is best to develop in Perl 5.005 if you want it to run on both.

But that detail aside, you will find your answer in the documentation for eval. Which is where you should have looked first.

OTOH when you are done that you will find yourself reaching for answers to several other questions. For instance why is strict not being picked up? Also why is 5.005 going to fail to pick most of those modules?

A far, far better solution is to create useless fallback versions of 5.6 specific modules. Then just use away with no trickery.

  • Comment on Re (tilly) 1: Cross-developing in 5.005 and 5.6 (code)