Skip to content

Commit

Permalink
Merge pull request #913 from shawnlaffan/issue_755_remove_panda
Browse files Browse the repository at this point in the history
Remove usages of Panda::Lib
  • Loading branch information
shawnlaffan authored Feb 5, 2024
2 parents b56b8da + cd00cb9 commit 1bdb740
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 19 deletions.
2 changes: 1 addition & 1 deletion lib/Biodiverse/BaseStruct.pm
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use Ref::Util qw { :all };
use Sort::Key::Natural qw /natsort rnatsort/;

use constant HAVE_DATA_RECURSIVE
=> !$ENV{BD_NO_USE_PANDA} && eval 'require Data::Recursive';
=> !$ENV{BD_NO_USE_DATA_RECURSIVE} && eval 'require Data::Recursive';

our $VERSION = '4.99_002';

Expand Down
20 changes: 2 additions & 18 deletions lib/Biodiverse/Indices/Phylogenetic.pm
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,8 @@ our $VERSION = '4.99_002';
use constant HAVE_BD_UTILS => eval 'require Biodiverse::Utils';
use constant HAVE_BD_UTILS_108 => HAVE_BD_UTILS && eval '$Biodiverse::Utils::VERSION >= 1.08';

use constant HAVE_PANDA_LIB
=> !$ENV{BD_NO_USE_PANDA} && eval 'require Panda::Lib';

use constant HAVE_DATA_RECURSIVE
=> !$ENV{BD_NO_USE_PANDA} && eval 'require Data::Recursive';
=> !$ENV{BD_NO_USE_DATA_RECURSIVE} && eval 'require Data::Recursive';


#warn "Using Data::Recursive\n" if HAVE_DATA_RECURSIVE;
Expand Down Expand Up @@ -1863,9 +1860,6 @@ sub get_node_range {
if (HAVE_DATA_RECURSIVE) {
Data::Recursive::hash_merge (\%groups, $gp_list, Data::Recursive::LAZY());
}
elsif (HAVE_PANDA_LIB) {
Panda::Lib::hash_merge (\%groups, $gp_list, Panda::Lib::MERGE_LAZY());
}
else {
@groups{keys %$gp_list} = undef;
}
Expand All @@ -1881,9 +1875,6 @@ sub get_node_range {
if (HAVE_DATA_RECURSIVE) {
Data::Recursive::hash_merge (\%groups, $c, Data::Recursive::LAZY());
}
elsif (HAVE_PANDA_LIB) {
Panda::Lib::hash_merge (\%groups, $c, Panda::Lib::MERGE_LAZY());
}
else {
@groups{@$c} = undef;
}
Expand All @@ -1892,10 +1883,7 @@ sub get_node_range {
if (HAVE_DATA_RECURSIVE) {
Data::Recursive::hash_merge (\%groups, $cached_list, Data::Recursive::LAZY());
}
elsif (HAVE_PANDA_LIB) {
Panda::Lib::hash_merge (\%groups, $cached_list, Panda::Lib::MERGE_LAZY());
}
else {
else {
@groups{keys %$cached_list} = undef;
}
}
Expand Down Expand Up @@ -2674,10 +2662,6 @@ sub _calc_phylo_abc_lists {
Data::Recursive::hash_merge (\%A, $nodes_in_path1, Data::Recursive::LAZY());
Data::Recursive::hash_merge (\%A, $nodes_in_path2, Data::Recursive::LAZY());
}
elsif (HAVE_PANDA_LIB) {
Panda::Lib::hash_merge (\%A, $nodes_in_path1, Panda::Lib::MERGE_LAZY());
Panda::Lib::hash_merge (\%A, $nodes_in_path2, Panda::Lib::MERGE_LAZY());
}
else {
%A = (%$nodes_in_path1, %$nodes_in_path2);
}
Expand Down

0 comments on commit 1bdb740

Please sign in to comment.