Taguchi san, I like the coding style below for one main reason: it's easy to comment out if needed.
IMHO good coding style should support the following: 1. Easy to read. Puristic styles are a matter of opinion. I prefer to maintain a hybrid concept between K&R, BSD, and none-of-the-above; choosing one where it makes the code easier to understand at first (or second) glance. 2. Easy to comment out. Since Perl does not support block comments like C (/* and */), I usually refactor key blocks of codes into functions, so it's easier to deactivate them (eg. for debugging purposes). 田口 浩 wrote: > Hello, > > The code below is in the Camel book, and I like this style. > Anyone knows the name of this style or there is no such a name? > > ---------------------------- > if (/^abc/) { $abc = 1 } > elsif (/^def/) { $def = 1 } > elsif (/^xyz/) { $xyz = 1 } > else { $nothing = 1 } > ---------------------------- > > I know K&R and BSD/Allman style refering to the IF style, > but this is not these. > I can't remember someone was calling it as... > > Regards, > Hirosi Taguti > _______________________________________________ > Perl-Win32-Users mailing list > Perl-Win32-Users@listserv.ActiveState.com > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs > _______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs