Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^3: MVC Catalyst Architecture - City, State Zip locator

by Your Mother (Archbishop)
on Jul 21, 2008 at 23:40 UTC ( [id://699185] : note . print w/replies, xml ) Need Help??


in reply to Re^2: MVC Catalyst Architecture - City, State Zip locator
in thread MVC Catalyst Architecture - City, State Zip locator

I'd say, general rule, avoid comments in Perl in favor of Pod. Comments have their place (and opinions differ widely) but I personally only like to see them when they illuminate some data or business logic oddity and as you'll read here, they can lie or be out of sync just as often as they help. Well chosen variable and sub names are better than comments most of the time.

Here are examples of both. See perlpod for more.

# Perl only has one real comment style, this is it. # Leading pound/number sign. =head2 get_zip L</get_zip> takes blah, blah, and returns blah, blah, blah. Pod has more syntax and is readily convertible to a number of formats +from RTF to WikiText and HTML and plenty in between. =cut sub get_zip { my $self = shift; # ...

Replies are listed 'Best First'.
Re^4: MVC Catalyst Architecture - City, State Zip locator
by Anonymous Monk on Jul 22, 2008 at 13:36 UTC
    I've never heard of Perlpod before - actually, alot of this is new to me. I can understand bad commenting - just never thought anyone would do something like. Rather tactless. I will look into perlpod now that I'm starting to learn Perl.