>> For the archive record, that won't work, because 'use' is done at >> compile-time (here, the compile-time of the BEGIN block, which is >> Compile Man's compile-time), before the if() statement has a chance to >> work. > > Quite right - my bad. Also, as Dan pointed out, there's more to it than > simply checking for the appropriate version - multiplicity, threading, > and 64-bit support are all compile-time options that affect binary > compatibility.
Thank you to all who replied to my query. I assume that I can replace use with require to get around the compile-time issue. However, when I do this, I run into lots of path issues since the XS module needs to access the blib/lib and blib/arch directors as well. I'm having a hard time finding references explaining how an XS module is packaged at the binary level so I can fully understand what's going on. Regarding the binary compatibility issues, is anyone aware of a reference that describes which options change binary compatibility? Are these all detectable from within a Perl script? Cheers -Mark --------------------------------------------------------------------- Mark Alldritt Late Night Software Ltd. Phone: 250-380-1725 333 Moss Street FAX: 250-383-3204 Victoria, B.C. WEB: http://www.latenightsw.com/ CANADA V8V-4M9