Use formerly experimental Perl features with "use experimental"

This is semantically equivalent to use feature + no warnings, but less
noisy. I've also added comments to indicate when the line can be
removed.
This commit is contained in:
Juerd Waalboer 2023-09-10 02:08:29 +02:00
parent c465ae1445
commit 59387ddba4
10 changed files with 12 additions and 21 deletions

View file

@ -2,8 +2,8 @@ package RevBank::Amount;
use v5.28;
use warnings;
use feature qw(signatures);
no warnings qw(experimental::signatures);
use experimental 'isa'; # stable since v5.32
use experimental 'signatures'; # stable since v5.36
use Carp qw(carp croak);
use Scalar::Util;
@ -13,7 +13,7 @@ our $C = __PACKAGE__;
sub _coerce {
for (@_) {
unless (ref and UNIVERSAL::isa($_, $C)) {
unless ($_ isa $C) {
croak "Unsupported operation on $C with " . ref if ref;
croak "Unsupported operation on $C with undef" if not defined;

View file

@ -2,8 +2,7 @@ package RevBank::Cart;
use v5.28;
use warnings;
use feature qw(signatures);
no warnings qw(experimental::signatures);
use experimental 'signatures'; # stable since v5.36
use Carp ();
use List::Util ();

View file

@ -2,8 +2,7 @@ package RevBank::Cart::Entry;
use v5.28;
use warnings;
use feature qw(signatures);
no warnings qw(experimental::signatures);
use experimental 'signatures'; # stable since v5.36
use Carp qw(carp croak);
use RevBank::Users;

View file

@ -2,8 +2,7 @@ package RevBank::FileIO;
use v5.28;
use warnings;
use feature qw(signatures);
no warnings qw(experimental::signatures);
use experimental 'signatures'; # stable since v5.36
use autodie;
use Fcntl qw(:flock);

View file

@ -2,8 +2,7 @@ package RevBank::Global;
use v5.28;
use warnings;
use feature qw(signatures);
no warnings qw(experimental::signatures);
use experimental 'signatures'; # stable since v5.36
use POSIX qw(strftime);
use RevBank::Amount;

View file

@ -2,8 +2,7 @@ package RevBank::Messages;
use v5.28;
use warnings;
use feature qw(signatures);
no warnings qw(experimental::signatures);
use experimental 'signatures'; # stable since v5.36
use RevBank::Global;
use base 'RevBank::Plugin';

View file

@ -2,8 +2,7 @@ package RevBank::Plugin;
use v5.28;
use warnings;
use feature qw(signatures);
no warnings qw(experimental::signatures);
use experimental 'signatures'; # stable since v5.36
require RevBank::Global;

View file

@ -2,8 +2,7 @@ package RevBank::Plugins;
use v5.28;
use warnings;
use feature qw(signatures);
no warnings qw(experimental::signatures);
use experimental 'signatures'; # stable since v5.36
use RevBank::Eval;
use RevBank::Plugin;

View file

@ -2,8 +2,7 @@ package RevBank::TextEditor;
use v5.28;
use warnings;
use feature qw(signatures);
no warnings qw(experimental::signatures);
use experimental 'signatures'; # stable since v5.36
use autodie;
use RevBank::Global;

View file

@ -2,8 +2,7 @@ package RevBank::Users;
use v5.28;
use warnings;
use feature qw(signatures);
no warnings qw(experimental::signatures);
use experimental 'signatures'; # stable since v5.36
use RevBank::Global;
use RevBank::Plugins;