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?).
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.