B McKee wrote:

> Hi All,
>
>         I'm slowly creating my Perl Masterpiece (tm)
> I'll let ya all giggle over it when I'm done :-)
> At any rate - It's done what I believe you call "top-down".
> I declare the subs,

Not generally necessary, and oftentimes problematic, in Perl

> then have the code for the main program,
> then the subroutine code blocks.
> My question is what order should the subroutines appear in?
> Alphabetical?  Order of appearance? Rough grouping by function?
> The fact that some subroutines may or may not call other subroutines
> and some of the subs are called by pretty much all the other subs
> makes it hard for me to decide what order would make it easiest to read.
> What's the 'standard'?
>
> Brian

I generally define functions in order of the calls to them, and immediately
after the function that calls them.  Functions that are called from many places
are a bit trickier.  I tend to define those after the last call to them.

Joseph


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to