There is no excuse for not finding a style of code indentation and sticking to it. No excuse, especially when you present that code to others for review. It's really hard to tell which lines belong in a block if you don't use indentation. And please don't use the excuse everyone gives: "Well, i was going to go back and put indentation in later ..." ... do it now.# fill in some parameters in the template $template->param(Number => $Number); $template->param(new => $new); $template->param(story => $story); $template->param(id_no => $id_no); $template->param(message_no => $message_no); if (($check == '0') or ($check == '3') or ($check == '4')) { $template->param(tart => $tart); $template->param(ear => $ear); $template->param(mouth => $mouth); }
And if you don't know how to indent your code properly, then by all means let Perltidy decide for you. I would rather all newcomers use Perltidy to indent their code than have them just slam stuff to us. Oh and by the way ... HTML::Template::param() accepts a list, so you can say stuff like:
Hope this helps. :)# fill in some parameters in the template $template->param( Number => $Number, new => $new, story => $story, id_no => $id_no, message_no => $message_no, );
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
In reply to Re: Unused variable in HTML::Template results in blank screen
by jeffa
in thread Unused variable in HTML::Template results in blank screen
by jonnyfolk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |