I have an os check for this method call
You'd have to avoid that the code is even being compiled (as opposed to not being run only), for example by (again) making use of string-eval:
use strict; eval 'printf "%d\n", DETACHED_PROCESS;' if $^O =~ /win32/i; # ok printf "%d\n", DETACHED_PROCESS if $^O =~ /win32/i; # not o +k: Bareword "DETACHED_PROCESS" not allowed...
In reply to Re^2: require different modules per OS?
by almut
in thread require different modules per OS?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |