I like Corion's approach, in fact I use a similar approach as well. I think this approach is cleaner than mixing codes for different platforms into a single module.
My similar approach:
package My::Functions;
...
my $OS_TYPE = ...;
eval "require My::Functions::$OS_TYPE" or die "Can not load module";
..