diff --git a/kdesrc-build b/kdesrc-build index fb5e055..4f52bec 100755 --- a/kdesrc-build +++ b/kdesrc-build @@ -74,6 +74,11 @@ use ksb::DependencyResolver 0.20; use 5.010_000; # Require Perl 5.10.0 +# Perl 5.18 warns on given/when/~~, but also is the first version of +# Perl to support conditional disabling of warnings, so we have to +# version-protect our warning remover. +no if $] >= 5.018, 'warnings', 'experimental::smartmatch'; + # Make Perl 'plain die' exceptions use Carp::confess instead of their core # support. This is not supported by the Perl 5 authors but assuming it works # will be better than the alternative backtrace we get (which is to say, none) diff --git a/modules/ksb/BuildContext.pm b/modules/ksb/BuildContext.pm index 98cc47c..23c70da 100644 --- a/modules/ksb/BuildContext.pm +++ b/modules/ksb/BuildContext.pm @@ -8,6 +8,7 @@ package ksb::BuildContext; use strict; use warnings; use v5.10; +no if $] >= 5.018, 'warnings', 'experimental::smartmatch'; our $VERSION = '0.10'; diff --git a/modules/ksb/IPC.pm b/modules/ksb/IPC.pm index f33318f..4bdb206 100644 --- a/modules/ksb/IPC.pm +++ b/modules/ksb/IPC.pm @@ -8,6 +8,7 @@ package ksb::IPC; use strict; use warnings; use v5.10; +no if $] >= 5.018, 'warnings', 'experimental::smartmatch'; our $VERSION = '0.20'; diff --git a/modules/ksb/Module.pm b/modules/ksb/Module.pm index 27224af..ed7ffaa 100644 --- a/modules/ksb/Module.pm +++ b/modules/ksb/Module.pm @@ -9,6 +9,7 @@ package ksb::Module; use strict; use warnings; use v5.10; +no if $] >= 5.018, 'warnings', 'experimental::smartmatch'; our $VERSION = '0.10';