Please build this for me, yesterday, also!

use Port::Authority;

Port::Authority would be a module which assigns and tracks ports for use with multiple application servers running on the same box. It would need an algorithm, capable of generating reproducible results, to generate port numbers in which are available, maybe it could be based on a namespace or random string + current user (etc), or maybe you could be able to specify the type of algorithm (e.g. UUID).

I need this yesterday for a variety of reason, what do you guys think?

5 Comments

According to daxim in #perl this already exists:

http://p3rl.org/Test::TCP#empty_port

Just a few days ago I extracted empty_port and _check_port from Test::TCP to use it in some 0mq project. Do you think it would make sense to publish a CPAN module that only implements empty_port?

I'd love something like that...

I've extracted to code into Net::EmptyPort and tokuhirom already release a TRIAL version of Test::TCP containing that module:

http://blog.64p.org/entry/2013/02/27/183549

Leave a comment

About Al Newkirk

user-pic ... proud Perl hacker, ask me anything!