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:
parent
c465ae1445
commit
59387ddba4
10 changed files with 12 additions and 21 deletions
|
@ -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;
|
||||
|
||||
|
|
|
@ -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 ();
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue