From:                   "Darryl Schnell" <[EMAIL PROTECTED]>

> This may not be the place to ask this question so forgive me. I know a
> few people who are obsessed with the way their perl code is formatted
> and I was wondering what does actual good readable perl  code and bad
> formatted perl code look like?

You know you see a badly formated code when you see it.

But there are several good formating styles and choosing one is (if 
you are lucky) just a matter of personal taste or (if not so lucky) a 
matter of coding style in your company.

But there is not one provably best style.

> I usually have my code looking something like this:
> 
> (Note not a real program just my formatting style).
> 
> if ($action eq "Submit") {
>   $value =1;
>   $value =2;
>   if ($testus = "2") {
>     $testus = 6;
>   }
> }
> 
> Would the above code be considered poorly formatted?

This is very close to how I would format it.

Just two unimportant notes.

1) I would (if I cared about formating, which I sometimes forget) put 
a space after the = in 

        $value = 1;

2) I'd probably use

        $testus = 6 if $testus == 2;
or
        $testus = 6 
                if $testus == 2;


(I guess the single = in the condition was a typo :)

Jenda


=========== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ==========
There is a reason for living. There must be. I've seen it somewhere.
It's just that in the mess on my table ... and in my brain.
I can't find it.
                                        --- me

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to