Stas Bekman [EMAIL PROTECTED] writes:
local is perl4-ism, nowadays it's used only for localizing special
perl variables, like $|.
Using package variables and local() in to do the job of block-scoped
lexicals is a Perl4-ism.
On the other hand, when using global variables (in which I include
Brian McCauley wrote:
[...]
OK, your last post's examples were more to the point of wanting to destroy
objects at the end of the request, and hence here is a new summary:
- move the perl4 lib solution to the perl_reference.pod
- suggest turning a lexical variable declared with my() into a global
Stas Bekman [EMAIL PROTECTED] writes:
Brian McCauley wrote:
[...]
Nice, but:
+The easiest and the fastest way to solve the nested subroutines
+problem is to change Cmy to Clocal Cour for all variables for
+which you get the warning. The Chandler subroutines are never
...
[...]
[...]
In effect you use local() to undef the variable, instead of explicitly
initializing it. Why not doing this explictly?
Firstly it's conceptually neater to use local. I want to think of the
variable as local rather than as a global variable that needs to be
explicitly reset.
local is
On Wed, 2003-09-03 at 21:24, Stas Bekman wrote:
[...]
In effect you use local() to undef the variable, instead of explicitly
initializing it. Why not doing this explictly?
Firstly it's conceptually neater to use local. I want to think of the
variable as local rather than as a global
Perrin Harkins wrote:
To summarize:
- move the perl4 lib solution to the perl_reference.pod
- suggest replacing my() with our() to avoid the closure, however this change
requires that the variables will be initialized before used in most cases
(example of 'open our $foo' which doesn't need to
Brian McCauley wrote:
[...]
Nice, but:
+The easiest and the fastest way to solve the nested subroutines
+problem is to change Cmy to Clocal Cour for all variables for
+which you get the warning. The Chandler subroutines are never
...
[...]
+ local our $counter = 0;
local our? That should be
Stas Bekman [EMAIL PROTECTED] writes:
[EMAIL PROTECTED] wrote:
In private mail Stas Bekman [EMAIL PROTECTED] writes:
oops, that should be the modperl list... at modperl-docs we discuss
mostly site/docs techical issues and there are very few people on this
list to get enough exposure for
[EMAIL PROTECTED] wrote:
In private mail Stas Bekman [EMAIL PROTECTED] writes:
oops, that should be the modperl list... at modperl-docs we discuss
mostly site/docs techical issues and there are very few people on this
list to get enough exposure for this kind of feedback request.
Patch for The