Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Am I over-commenting my code?

by QwertyD (Pilgrim)
on Jun 11, 2002 at 22:57 UTC ( #173687=note: print w/replies, xml ) Need Help??


in reply to Am I over-commenting my code?

In addition to the other posters' advice, you may want to put the comment inside the subroutine block, like so:

sub dump_subtable { # NAME # dump_subtable() - dump a subtable # # SYNOPSIS #etc... my ($self)= shift(@_); my (%args)= @_; #etc...
This way, if you want to change the order of the subs (for organizational purposes) or to move some subs into other files (less likely since this is part of a module, but probable in other types of programs), the comments will always stay with their associated subs.

This will, of course, vary to taste.


How do I love -d? Let me count the ways...

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (4)
As of 2020-05-27 21:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (162 votes). Check out past polls.

    Notices?