Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

runrig (3385)


Just another perl hacker somewhere near Disneyland

I have this homenode [] of little consequence on Perl Monks [] that you probably have no interest in whatsoever.

I also have some modules [] on CPAN [] some of which are marginally [] more [] useful [] than others.

Journal of runrig (3385)

Monday January 30, 2006
02:24 PM


[ #28521 ]

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 '' 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.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • But you might want to try replacing confess() with croak() by default. You can always turn a croak() into a confess() at runtime with use Carp 'verbose';.