Test::TCP doesn't do that by default?
If not, can't we try to send this kind of patch upstream?