OpenResty has consistent hash implementations in Lua and C that produce the same results as nginx, used to achieve consistent hash results identical to nginx within OpenResty. However, there was no such module in Perl, so I referenced the Lua and C code (basically pixel-level copying) and implemented consistent hash in Perl with identical results (test cases verified).
Project at: https://github.com/xiaocang/perl-balancer
TODO: No XS version implementation yet