Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re: Line-counts of perl programs/modules

by grinder (Bishop)
on Apr 27, 2001 at 11:42 UTC ( #76011=note: print w/replies, xml ) Need Help??

in reply to Line-counts of perl programs/modules

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
  • Comment on Re: Line-counts of perl programs/modules

Log In?

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

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

    No recent polls found