- or download this
BEGIN {
$^O eq 'Win32'
? eval q[ sub f { ... } ] # Win32 implementation
: eval q[ sub f { ... } ] # Linux implementation
};
- or download this
BEGIN { eval($^O eq 'Win32' ? <<'WIN32' : <<'LINUX') };
sub f { print "f-w\n" }
...
sub f { print "f-l\n" }
sub g { print "g-l\n" }
LINUX
- or download this
use constant BROKEN_FORK_IMPLEMENTATION => ($^O eq 'Win32');
...
...;
}
}