in reply to Re^3: Check compiler features before building XS module ( extra_compiler_flags -std=c++11 )
in thread Check compiler features before building XS module

Well, Compress-DSRC-0.002/Build.PL uses Module::Build::WithXSpp which uses ExtUtils::CppGuess It is those modules that need enhancing not your Build.PL, so you can simply tell them you want C++11, without having to use extra_compiler_flags -std=c++11 or ... in your Build.PL

Definitely, thanks. I'll look into filing a feature request.

But you shouldn't prevent the compiler from trying Only the compiler knows for sure if it supports C++11 Best option is to let the compiler try

I don't disagree in principle, but in my mind the end result of a failure because of an incompatible compiler should be the same as a failure of other prerequisite checks (Perl version, OS, etc). This goes back to your first point about extending ExtUtils::CppGuess, which seems like the correct longer-term solution.

  • Comment on Re^4: Check compiler features before building XS module ( extra_compiler_flags -std=c++11 )

Replies are listed 'Best First'.
Re^5: Check compiler features before building XS module ( extra_compiler_flags -std=c++11 )
by Anonymous Monk on Jan 04, 2016 at 21:39 UTC

    I don't disagree in principle, but in my mind the end result of a failure because of an incompatible compiler should be the same as a failure of other prerequisite checks (Perl version, OS, etc). This goes back to your first point about extending ExtUtils::CppGuess, which seems like the correct longer-term solution.

    :)

    Well, for about 15 years now, I've seen these pre-compiler checks fail time after time

    Having to fight the tools, every enhanced Makefile.PL or new baby is tiresome :D

    Maybe 15 years from now these pre-compiler checks will be good enough to have final say

    Perl has always been optimistic, it should always be optimistic, its optimistic to let compiler have final say