Package bind provides a convenient syntax for binding to sockets, as well as a fair bit of magic to automatically Do The Right Thing in both development and production.