kjolley / BIGSdb

Bacterial Isolate Genome Sequence Database (BIGSdb): A platform for gene-by-gene bacterial population annotation and analysis.
https://pubmlst.org/software/bigsdb/
Other
56 stars 19 forks source link

Suggestion on round and lround module of POSIX #995

Closed abrozzi closed 2 months ago

abrozzi commented 2 months ago

Dear Keith,

I noticed that POSIXmodule triggers some conflicts with perl versioning (5.16 versus newer). Since lroundis only used once in /lib/BIGSdb/Plugins/SeqbinBreakdown.pm I would humbly suggest to replace it with something simple but effective like:

sub round {
    my ($number) = @_;
    return int($number + 0.5 * ($number <=> 0));
}

HTH -A

kjolley commented 2 months ago

Hi Alessandro,

This seems sensible and a good solution. Thanks.