BoardStreams/Client/Util.pm untested

filter: Statementstmt 0.0% 0 / 18 Branchbran n/a Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 0.0% 0 / 5 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 30 CC 1 SCAR 6.9
CC
1
Cov
0%
debug
2.0
unique_id
2.0
BEGIN
2.0
CRAP 2.0
1 package BoardStreams::Client::Util;
2  
3 use Mojo::Base -strict, -signatures;
4  
5 use Mojo::Log;
6  
7 use Exporter 'import';
8 our @EXPORT_OK = qw/ debug unique_id /;
9  
10 our $VERSION = "v0.0.36";
11  
12 my $log = Mojo::Log->new;
13 sub debug (@args) { $log->info(@args) }
14  
15 my $UNIQUE_ID_LIMIT = 2 ** 50;
16 my $unique_id_cursor = 1;
17 sub unique_id {
18 my $ret = $unique_id_cursor++;
19 $unique_id_cursor <= $UNIQUE_ID_LIMIT or $unique_id_cursor = 1;
20 return "$ret";
21 }
22  
23 1;