in reply to Tests on Windows for Unix-only module
I have a Windows-only module on CPAN (exact opposite of your case) but I do the "same", test if it's Windows and then the version of Windows. I do it in the Makefile.PL since the module is completely useless on *nix:
# Only supported on Win32 unless ($^O eq "MSWin32" || $^O eq "cygwin") { die "OS unsupported\n" } # Must be Win32 version greater than 5 # _WIN32_WINNT must be defined as greater than 5 for # LockWorkStation prototype to be defined in winuser.h. my $ver = `ver`; $ver =~ / ([\d\.]+)/; $ver = $1; if ($ver < 5) { die "OS unsupported\n Windows version must be greater than 5.\n +Found '$ver' with the 'ver' command." } WriteMakefile( [...]
If you don't want to preemptive test in the Makefile.PL, you can use SKIP in the tests after determining OS is Windows to skip over tests that won't make sense / fail.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Tests on Windows for Unix-only module
by mikosullivan (Novice) on Dec 30, 2014 at 05:55 UTC | |
by Anonymous Monk on Dec 30, 2014 at 06:47 UTC | |
by Anonymous Monk on Dec 30, 2014 at 06:55 UTC | |
by mikosullivan (Novice) on Jan 01, 2015 at 00:04 UTC |