in reply to Re: Seeking good ways to structure cross-platform code
in thread Seeking good ways to structure cross-platform code

Thanks Corion. I'm now using your approach and am very happy with it. I've changed $OS_TYPE to be 'Win32' and 'Unix' so I could replace:

if ($OS_TYPE eq 'win') { require My::Functions::Win32; } else { require My::Functions::Unix; };

with:

eval "require My::Functions::$OS_TYPE";

or:

require "My/Functions/$OS_TYPE.pm";

Both seem to work ok. Is there a reason to prefer one over the other?