Just another perl hacker somewhere near Disneyland
I have this homenode [perlmonks.org] of little consequence on Perl Monks [perlmonks.org] that you probably have no interest in whatsoever.
I also have some modules [cpan.org] on CPAN [cpan.org] some of which are marginally [cpan.org] more [cpan.org] useful [cpan.org] than others.
Keeping in mind that I do no admin'ing (system/network or otherwise) whatsoever, I haven't a clue what would make my Net-CIDR-Lite
more useful or correct to those that might want to use it for some practical purpose, and probably ought to give it away to someone who knows/cares more about such things. I read in one place that the net mask should be a number from 8-32, and I see in my code I allow it to be 2-32 and I have no recollection why I started at 2. And then someone emailed me that I should allow '0.0.0.0/0' because its a catch-all address that is useful. Wikipedia says I should allow 0-32, so I guess it ought to be ok to change it. And just changing '2' to '0' in the code doesn't seem to introduce any horrible side effects
Another issue in the same email was that the module dies on error from bad input, and that it ought to instead return undef and have some error code (from a package variable or method). At first I said that an option to do that would be ok, but now that I think about it, it really just introduces useless cruft, and if you really wanted to, you could write a wrapper module to do that. The requestor was under the misguided notion that 'eval' was bad, and didn't know that 'eval { BLOCK }' is idiomatic perl exception catching.
Nowt wrong with eval{} (Score:2)
use Carp 'verbose';.