Detect the OS Perl Code is Running Under

I was looking into updating a couple of my perl modules because is being sunset early in 2021. As part of this I thought it was time to stop cpan testers from testing my module under Windows since it is currently not really supported.

I was not sure how to go about doing this, so I reached out the good people in the “Perl Programmers” group on FaceBook. I got some great links and suggestions. In order to make this easy for me to find. I am documenting some of them here.

  1. Top of Makefile.PL
die 'kaput' if ($^O eq 'MSWin32');
  1. Stackoverflow

  2. Sample for Skipping Mac OS

  3. Some links from Erki

See also