[dev] line continuation coding standard?

Eric Garrido ekg2002 at columbia.edu
Thu Mar 8 04:01:24 UTC 2007


In Perl, Damian Conway has an implicit recommendation in "Perl Best  
Practices" that the assignment be split such that the operator is the  
first non-whitespace character on the next line. (Pages 31 and 60)

In other words, in Perl, option 2 is recommended. I think that's  
better anyway as it shows the intent of the second line a priori.

Eric

On Mar 7, 2007, at 8:43 PM, Matt Selsky wrote:

> When a concatenated string spans multiple lines, where is the '.'
> supposed to go?
>
> $foo = 'bar' .
>      'baz';
>
> or
>
> $foo = 'bar'
>      . 'baz';
>
> I didn't see this in the CODING_STANDARDS doc...

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://lists.horde.org/archives/dev/attachments/20070307/440fc090/attachment.bin 


More information about the dev mailing list