develooper Front page | perl.perl5.porters | Postings from April 2010

Re: RFC: Perl manual pages -- update to follow the perlstyle.pod guidelines

Thread Previous | Thread Next
H.Merijn Brand
April 5, 2010 06:50
Re: RFC: Perl manual pages -- update to follow the perlstyle.pod guidelines
Message ID:
On Mon, 5 Apr 2010 09:33:39 -0400, Brad Baxter <>

> On Sun, Apr 4, 2010 at 7:22 AM, Jari Aalto <> wrote:
> > It can be made visually distict by alternative means. You do not need to
> > type monotonic "one space" around every word:
> >
> >    close FH or die "can't close $path: $!";          # bad
> >
> >    close FH  or  die "can't close $path: $!";        # better
> >
> I disagree with "bad", and I disagree with "better".  Sorry.
> I, for one (perhaps literally), think this
> function( a, b, c );
> $hash{ $x };
> $array[ $i ];
> is better than this
> function(a, b, c);
> $hash{$x};
> $array[$i];

Abigail prefers (IIRC)

  $hash {$x}
  $array [$i]

and I prefer

  function ($a, $b, $c);

so many people, so many preferences. None is better or safer than the
other, and sure none is the `best'. They all have to do with how your
mind wraps about the logic you want to express in your code. The best
is IMHO the style that the complete team can agree on. So no-one will
be coding in a style he/she appalls.

Two spaces (or more make sense when aligning stuff

  $a  = 1;
  $br = "<br />";

and - in my case - for functions

  step1    ("bread");
  step15   ("milk");
  step2    (102);
  steps3_6 ("Yummie");

And even if you have (as a team) a very strict policy in alignments or
horizontal white-space, there are enough spots to make exceptions for
whatever valid reason.

> so I'm not shy about an extra space around tokens.
> But *two* extra spaces?  Unless it's to align things
> vertically, then no, please, not in documentation.

I agree

H.Merijn Brand      Perl Monger
using & porting perl 5.6.2, 5.8.x, 5.10.x, 5.11.x on HP-UX 10.20, 11.00,
11.11, 11.23, and 11.31, OpenSuSE 10.3, 11.0, and 11.1, AIX 5.2 and 5.3. 

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About