On Mon, 26 Mar 2012 20:58:43 +0200
Paul Johnson <p...@pjcj.net> wrote:

> On Mon, Mar 26, 2012 at 06:10:08PM +0200, Manfred Lotz wrote:
> > On 25 Mar 2012 13:11:16 -0000
> > Peter Scott <pe...@psdt.com> wrote:
> > 
> > > On Thu, 22 Mar 2012 20:06:35 -0400, Uri Guttman wrote:
> > > >  no one uses braces for single scalar handles in general.
> > > 
> > > I do.  Ever since Damian recommended it (Perl Best Practices, page
> > > 217). One of those numerous times I didn't agree with him until I
> > > tried it, then found he was right.
> > > 
> > 
> > Peter, thanks for this. As it is a goal for me as a Perl beginner to
> > learn a good Perl coding style I will stick to this also.
> 
> It's a good goal to have, but remember the Perl motto: There's more
> than one way to do it.
> 
> You're unlikely to go wrong following the advice in perstyle:
> http://perldoc.perl.org/perlstyle.html.  

Thanks, that is also something really good to pay attention to.
Especially in the beginning it is good to look at it often.


> But outside of that opinions,
> are likely to diverge.  In this case I suspect there'll be at least at
> many people telling you to drop the braces as there are to add them.
> Indeed, it could be argued that adding them goes against the perlstyle
> advice:
> 

I know that what can be found in PBP are also 'only' opinions and that
in many cases those opinions could be argued against. The good thing
is I'm not fanatic about it. :-)
 

>   Omit redundant punctuation as long as clarity doesn't suffer.
> 
> So, to a certain extent, you'll need to devise your own style.
> 

You are right. But I guess this comes naturally as I will collect 
different ideas from different sources which I may find ok or not ok
(always from my subjective point of view).


-- 
Manfred





-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to