Hi Gunther,

On Wed, 15 Aug 2001, Gunther Birznieks wrote:

> It is not off topic if you realize that the way Apache::Registry and 
> PerlRun wraps scripts will cause the closures to occur with my.

Nice one Gunther.  :)  TMTOWDI...

> It seems to me that he is confused about when the variable will not stay 
> shared or will which is a direct result of using shared programming.
[snip]
> the guide explains it OK?

That's http://perl.apache.org/guide

My feeling is that he's probably a C programmer.

Coming from 25 years of C and similar languages with no garbage
collection (where the stack is your shield and protector) it's a bit
of a shock to find that scope with "my" is really only about the paper
on which the code is written.  That means it's quite legitimate to
take a reference to a "my" scoped variable and use that reference even
after the original variable itself has gone out of *lexical* scope.

73,
Ged.

Reply via email to