Short working example with Device::Modbus::RTU::Server. As a client, it uses an Arduino with a third-party Modbus library and together, server and client compute the multiplication table for number three. A must see.
The current version of Device::Modbus tries to parse messages as they come. And this does not work because data arrives faster than it is processed. And this, without discussing that parsing like this wasn't even necessary.