Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
DRY in constructors #5
I asked to help out on random CPAN modules via the CPAN PR challenge, and I got assigned POE::Component::Client::Keepalive. I haven't ever done anything with POE, so this is me dumped in the deep end.
So while I explore a couple of outstanding issues (one of which I can reproduce partially but I don't understand why, because, well, never used POE), I thought I'd try something simpler. So I thought I'd look at the constructor of one of the main objects, which appears to violate DRY by making the most important information - the associated constant - a comment rather than something that code could do something about.
There are more things I could do on this subject but I thought I'd push a bunch of supposedly-reasonable code and ask first.
Does this look sane?