You are correct in that the OP has code that meets dragonchild's First Criterion of Good Coding. However, I would actually argue that the OP should convert to Win32::IPConfig, for the following reasons:
  1. OP would learn more about the Win32:: namespace
  2. OP would learn why it is useful to use said namespace
  3. Maintainer(s) (which might include OP) won't have to deal with hand-rolled code (and the bugs that go with no peer review)
  4. If ipconfig changes (as it probably will), Win32::IPConfig will (should?) change with it
  5. Should ipconfig be different on different Win32 machines, Win32::IPConfig will (should?) handle that transparently

Those reasons boil down to meeting the Second Criterion of Good Coding.

  1. Code should do what it needs to do.
  2. Code should be both easy and safe to modify.

  1. Code that meets #1, no matter how poorly written, is "good".
  2. Code that meets both #1 and #2 is "great".
  3. Code that meets #2, but not #1, is worthless.

------
We are the carpenters and bricklayers of the Information Age.

Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.


In reply to Re: Re: Having problems with class::struct by dragonchild
in thread Having problems with class::struct by spill

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.