The Generic Serial Device is a regular DCE C++, just running an embedded Ruby processor. Ruby doesn't handle any of the DCE messaging -- that's done by the C++ stuff.
DCE isn't particularly a complex format. It's basically just a matter of sending, via text over a socket: MESSAGE 1234
where 1234 is the size of the message (the binary data), and what follows is 1234 bytes of binary data that turn into a message. The only class really needed is the Message class. The same class could be done in perl, or another language, so they could communicate directly with the router, sending and receiving messages without using the C++ library.
However, since the C++ libraries already exist and are tested, it's probably better to avoid re-writing them in perl, and just using an embedded perl or other interpretor, like we did with Ruby. However, I know nothing about perl or ruby. I'd have to get someone else to reply to this if that's the direction you wanted to go.