in reply to Is a Net::CIDR::Lite object sharable within threads

I'll say...yes, I believe, with the locking that you mention (Update: I meant locking some separate variable, not the object. Though BrowserUK indicates below that even that is not necessary). I don't believe it would be safe to create multiple objects (or add addresses to objects) simultaneously in separate threads, as there is a package scoped variable that can get updated when adding addresses to objects (which can also happen on creation). But it only gets updated on the first 32-bit and/or the first 128-bit CIDR object...so after the first object of each/either size that should be okay too...I think...though they would still be accessing the same package variable, so that still might be bad in that case (because perl might update the innards of a variable even on mere access maybe?).
  • Comment on Re: Is a Net::CIDR::Lite object sharable within threads