packame MyProject::OSSpecific; use strict; use warnings; use parent 'MyProject::OSSpecific::'.$^O; # <-- this is the most important trick here. 1;