How do I go about testing a function or module that is machine or platform dependent? For example, something that looks at/depends on $^O
or a module like Net::Ifconfig::Wrapper? I don't need to test that Net::Ifconfig::Wrapper is returning the correct values, but I do need to test whether or not I'm doing the right thing with those values.
Thanks!
EDIT: Testing $^O
turned out to be easier than I thought:
{
# <~> $ perl -e 'print $^O'
# linux
local $^O = 'linux';
$rc = GetOSType();
is($rc, $OS_LINUX, 'OS Check - linux');
}
For some reason I thought it was a read-only variable.