From 89efbf89de914e2cc220235c90b73adf2b923ba3 Mon Sep 17 00:00:00 2001 From: shawnlaffan Date: Fri, 6 Sep 2024 11:29:01 +1000 Subject: [PATCH] Consolidate experimental feature usage idiom `use experimental` instead of the two step `use feature; no warnings` idiom --- lib/Biodiverse/Common.pm | 5 +---- lib/Biodiverse/Indices/Numeric_Labels.pm | 3 +-- lib/Biodiverse/Indices/PhyloCom.pm | 5 +---- lib/Biodiverse/Indices/Phylogenetic.pm | 5 +---- lib/Biodiverse/Indices/Phylogenetic/RefAlias.pm | 5 +---- lib/Biodiverse/Indices/PhylogeneticRelative/RefAlias.pm | 3 +-- lib/Biodiverse/Indices/RWTurnover.pm | 3 +-- lib/Biodiverse/Tree.pm | 5 +---- lib/Biodiverse/TreeNode.pm | 5 +---- 9 files changed, 9 insertions(+), 30 deletions(-) diff --git a/lib/Biodiverse/Common.pm b/lib/Biodiverse/Common.pm index 2f53595f2..9617c2b4a 100644 --- a/lib/Biodiverse/Common.pm +++ b/lib/Biodiverse/Common.pm @@ -6,10 +6,7 @@ use 5.036; use strict; use warnings; -use feature 'refaliasing'; -no warnings 'experimental::refaliasing'; - -use experimental 'for_list'; +use experimental qw/refaliasing for_list/; use Carp; use English ( -no_match_vars ); diff --git a/lib/Biodiverse/Indices/Numeric_Labels.pm b/lib/Biodiverse/Indices/Numeric_Labels.pm index 2c0c360c6..c73583205 100644 --- a/lib/Biodiverse/Indices/Numeric_Labels.pm +++ b/lib/Biodiverse/Indices/Numeric_Labels.pm @@ -3,8 +3,7 @@ use strict; use warnings; use 5.022; -use feature 'refaliasing'; -no warnings 'experimental::refaliasing'; +use experimental 'refaliasing'; use List::Util qw /sum min max/; #use List::MoreUtils qw /apply pairwise/; diff --git a/lib/Biodiverse/Indices/PhyloCom.pm b/lib/Biodiverse/Indices/PhyloCom.pm index 3b9ba3bc1..e87987c9d 100644 --- a/lib/Biodiverse/Indices/PhyloCom.pm +++ b/lib/Biodiverse/Indices/PhyloCom.pm @@ -11,10 +11,7 @@ use List::MoreUtils qw /any minmax pairwise/; use Scalar::Util qw /blessed/; use Sort::Key qw /nkeysort/; -use feature 'refaliasing'; -no warnings 'experimental::refaliasing'; - -use experimental 'for_list'; +use experimental qw/refaliasing for_list/; our $VERSION = '4.99_002'; diff --git a/lib/Biodiverse/Indices/Phylogenetic.pm b/lib/Biodiverse/Indices/Phylogenetic.pm index 965e3f40e..28d5dc9c9 100644 --- a/lib/Biodiverse/Indices/Phylogenetic.pm +++ b/lib/Biodiverse/Indices/Phylogenetic.pm @@ -8,10 +8,7 @@ use warnings; use English qw /-no_match_vars/; use Carp; -use feature 'refaliasing'; -no warnings 'experimental::refaliasing'; - -use experimental 'for_list'; +use experimental qw /refaliasing for_list/; use Biodiverse::Progress; diff --git a/lib/Biodiverse/Indices/Phylogenetic/RefAlias.pm b/lib/Biodiverse/Indices/Phylogenetic/RefAlias.pm index b5c2dd332..3f51286bb 100644 --- a/lib/Biodiverse/Indices/Phylogenetic/RefAlias.pm +++ b/lib/Biodiverse/Indices/Phylogenetic/RefAlias.pm @@ -7,10 +7,7 @@ use Carp qw/croak/; our $VERSION = '4.99_002'; -use feature 'refaliasing'; -no warnings 'experimental::refaliasing'; - -use experimental 'for_list'; +use experimental qw/refaliasing for_list/; use List::Util qw /sum/; diff --git a/lib/Biodiverse/Indices/PhylogeneticRelative/RefAlias.pm b/lib/Biodiverse/Indices/PhylogeneticRelative/RefAlias.pm index 92ef78af1..9ad8ff7d2 100644 --- a/lib/Biodiverse/Indices/PhylogeneticRelative/RefAlias.pm +++ b/lib/Biodiverse/Indices/PhylogeneticRelative/RefAlias.pm @@ -4,8 +4,7 @@ use warnings; our $VERSION = '4.99_002'; -use feature 'refaliasing'; -no warnings 'experimental::refaliasing'; +use experimental 'refaliasing'; sub _calc_phylo_rpe1_inner { my ($self, %args) = @_; diff --git a/lib/Biodiverse/Indices/RWTurnover.pm b/lib/Biodiverse/Indices/RWTurnover.pm index a698c5b8e..cd62bb01d 100644 --- a/lib/Biodiverse/Indices/RWTurnover.pm +++ b/lib/Biodiverse/Indices/RWTurnover.pm @@ -4,8 +4,7 @@ use warnings; #use autovivification; use 5.022; -use feature 'refaliasing'; -no warnings 'experimental::refaliasing'; +use experimental 'refaliasing'; use Carp; use List::Util qw /sum reduce/; diff --git a/lib/Biodiverse/Tree.pm b/lib/Biodiverse/Tree.pm index 5cc593f5b..b6c4f4d38 100644 --- a/lib/Biodiverse/Tree.pm +++ b/lib/Biodiverse/Tree.pm @@ -16,10 +16,7 @@ use Sort::Key qw /keysort rnkeysort rikeysort/; use Sort::Key::Natural qw /natkeysort/; use POSIX qw /floor ceil/; -use feature 'refaliasing'; -no warnings 'experimental::refaliasing'; - -use experimental 'for_list'; +use experimental qw/refaliasing for_list/; use English qw ( -no_match_vars ); diff --git a/lib/Biodiverse/TreeNode.pm b/lib/Biodiverse/TreeNode.pm index a3662789b..4dcea3588 100644 --- a/lib/Biodiverse/TreeNode.pm +++ b/lib/Biodiverse/TreeNode.pm @@ -4,10 +4,7 @@ use strict; use warnings; no warnings 'recursion'; -use feature 'refaliasing'; -no warnings 'experimental::refaliasing'; - -use experimental 'for_list'; +use experimental qw /refaliasing for_list/; use English qw ( -no_match_vars ); use Ref::Util qw { :all };