Perl-Toolchain-Gang / ExtUtils-MakeMaker

Perl module to make Makefiles and build modules (what backs Makefile.PL)

Home Page:https://metacpan.org/release/ExtUtils-MakeMaker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make it easier to say "OS not supported"

neilb opened this issue · comments

Last week I had to, not for the first time, try and remember / find the special string you exit from Makefile.PL with if the OS isn't supported. Ie this:

die "No support for OS\n" if $^O eq 'MSWin32';

At the very least this needs to documented somewhere, but more than that, how about EUMM providing one or more convenience functions, so people don't have to embed that string?a

This could be something like:

os_not_supported('MSWin32');
os_restriction('MSWin32');

Haven't really thought much about the interface -- I wanted to raise the ticket before I forgot about this.

I guess it would be in a separate package, so Build.PL could use it as well...

Implemented as os_unsupported() with commit fcdaaac

Implemented as os_unsupported() with commit fcdaaac

It really should document "supported since 7.26"

Calling that function from Makefile.PL requires configure_requires support from the underlying toolchain. Is that worth it for being able to spell die "OS unsupported\n" as os_unsupported()? 😐

Of course not. But in 20 years, when everyone has this version of EUMM in core, we'll sure be happy we have it. 👯‍♂️

(sarcasm)

Fear not: the clock started 6 years ago when 5.14 shipped with working configure_requires, so it’s only 14 years from now. 😊

Can this issue be closed now?