Remove warnings under Perl 5.18.

Once I figure out a "preferred" solution for this use case I'll probably
convert to that, until then no reason to pollute with warnings.

I've run a search for other uses of given/when and didn't see any.
wilder
Michael Pyne 13 years ago
parent 044fa3d55a
commit 31e34a0fd0
  1. 5
      kdesrc-build
  2. 1
      modules/ksb/BuildContext.pm
  3. 1
      modules/ksb/IPC.pm
  4. 1
      modules/ksb/Module.pm

@ -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)

@ -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';

@ -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';

@ -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';

Loading…
Cancel
Save