Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

I suppose tis amatter of coding style, but often the process that occurs is like this: I know I need to handle options, x, y, z and that I want them have defaults. I write the Getoptions code, and then start working on the code that uses those options. If during that process I realize that the names i have chosen for the vars dont have the right names, I change them then and there, once finished the code that uses the vars, (and settling on the right names) I go back and adjust afterwards. Why not search and replace? Usually these vars are lexical for me, and usually I dont want to change every instance at once, yes I could hover on the search/replace button, changing the appropriate ones, but often I dont bother, its less effort to go to the one place in my code that I know is relevent and make he changes by hand, and quickly.

Having said that your suggestions are welcome, but even more welcome would be an explanation of the motivations you had for using this style, and the motivations for not chosing it as well.

Cheers,


---
demerphq



In reply to Re: Re: GetOpt::Long usage style by demerphq
in thread GetOpt::Long usage style by demerphq

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2024-04-16 09:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found