----- Original Message -----
From: "Jeff Pinyan" <[EMAIL PROTECTED]>
To: "Aaron Craig" <[EMAIL PROTECTED]>

OTOT   (off the original topic)

> Before I answer your question, I have to ask you to not use subroutine
> prototypes.  9 out of 10 Perl programmers use them incorrectly or don't
> know what they do.
>

> The problem is:  PROTOTYPES MUST BE SEEN BEFORE THE FUNCTION IS CALLED.
> So few people realize that (for one reason or another[1]).

I've seen this statement before and do not really understand it, having come
from a 'true-compiler' background. It is the 'seen' that puzzles me.

If I have a 'require' then I believe the prototype is inspected.
If the subroutine occurs at the front of the 'main' code (ie before being
used) then I believe the prototype is inspected

However if I have code that goes:

&dummysub( )
&realsub('paulus')
.
.
sub realsub($)
{....}
sub dummysub( )
{...}

Has the realsub prototype been analyzed? I guess what I am asking is what
constitutes seeing?

Please correct glaring mistakes, misapprehensions, omissions and apocryphal
statements.

Regards - Paul Cotter







Reply via email to