This article shows my first attempt at writing a Modbus server using AnyEvent.
Following the steps of Device::Modbus::RTU, a new test file has been added to Device::Modbus::TCP which forks into a server and a client, and tests log output.
After an embarrassing failure, tests were added to Device::Modbus::RTU::Server. It was not obvious to me how to test this module, so it is detailed here.
The rewritten Device::Modbus distribution is now documented. Well, almost documented: Device::Modbus::RTU and Device::Modbus::TCP are still missing.
A server with the simplest of tasks (returning a constant) was run successfully in a Rasberry Pi.