in reply to Re: Re: Re: Re: where do you put your subs
in thread where do you put your subs
Even Merlyn puts his subs last in his Web Techniques columns, which are deliberately aimed at instructing others on how to do things the right way.And I think merlyn does it the wrong way. Besides, what merlyn does isn't automatically the right way to do it. Actually, I find much of his code written in an awful style, but I guess he'd say the same when reading my code. (OTOH, it's really hard to have good style when you're writing simple stand-alone web applications.)
, which is great to look at, easy to read and very maintaible. You could do the same with a lot of closures, and thus bundle subs with the location of use.my $qwerty; # Description { my ($foo, $bar); code; code; code; } # And now we're going to ... { my ($xyzzy); code; code; } # Etcetera... { code; code; code; }
44696420796F7520732F2F2F65206F
7220756E7061636B3F202F6D736720
6D6521203A29202D2D204A75657264
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Re: Re: Re: Re: where do you put your subs
by Trimbach (Curate) on Mar 08, 2002 at 16:16 UTC |