Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

This sounds flippant, but I count lines with wc -l file. My coding style tends to rely heavily on complex data structures. For instance, I'm looking at one of my scripts that declares a hash of hashes that takes up 28 lines (and 110 chars wide). However by counting semis, that counts as only one line.

It does, however pack an awful lot of functionality away: scalars and coderefs. The code that operates upon it is then pretty simple: it just walks down the keys and tells the values to "do themselves".

What about here documents? What about TR's fed map{}ed arrays in A line can represent a fearsome amount of code in Perl.

So all in all I just run wc and then get on with the job. If it were enough of an obsession and I was a student with a lot of time on my hands I'd consider writing a module to perform function point analysis.

g r i n d e r

In reply to Re: Line-counts of perl programs/modules by grinder
in thread Line-counts of perl programs/modules by Tarka

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 or How to display code and escape characters are good places to start.
Log In?

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (2)
As of 2022-08-18 04:53 GMT
Find Nodes?
    Voting Booth?

    No recent polls found