Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Having problems with class::struct

by jmanning2k (Pilgrim)
on Dec 11, 2003 at 22:01 UTC ( [id://314176]=note: print w/replies, xml ) Need Help??


in reply to Having problems with class::struct

Have you looked at the CPAN modules? Win32::IPConfig is an OO interface to the ipconfig data.

Though if what you have works for what you need it for (and is working with the helpful suggestions already listed), then just stick with what you've got.

Replies are listed 'Best First'.
Re: Re: Having problems with class::struct
by dragonchild (Archbishop) on Dec 12, 2003 at 13:29 UTC
    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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://314176]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2024-04-25 17:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found