It seems to me that all you wish to do is use ssh as the means to invoke a remote application, thereby using it as a simple transport or tunnel. I am pretty sure you don't need to do any ssh daemon futzing in Perl, but the remote client would; for example in your link above:
I could configure openssh-server to execute a Perl program upon connection, but that would require user accounts on the server. I would also lose a lot of control if the connections were handled by OpenSSH.
The goal is to create a self-contained Perl program (it's fine if it requires external modules) that listens on port 22. For simplicity, it can be a basic echo server. I'll connect by entering ssh localhost and it will echo back the lines I enter.
If all you want is a secure layer (and no users) maybe base your application on HTTPS (e.g., using Dancer2 and something like starman) rather than trying to emulate what ssh does.