Re: lexical scoping under mod perl solution

2009-02-12 Thread André Warnier
As someone pointed out, these things can be very practical too. #--- #!/usr/bin/perl # my nifty cgi-bin use strict; use warnings; our $big_table; { package XX; no strict; $var1 = 0; } sub sub1 { my $key = shift; unless (defined($big_table)) { go_fill_it($big_table); $XX::va

Re: lexical scoping under mod perl solution

2009-02-12 Thread Erik Aronesty
>> (A solution would be to force all "my" varialbes at the file scope to >> be "our" and then put the cgi in an anonymous package:) > > A file/package-scoped "my" var is not the same thing as an "our" var. One > example is that a "my" var can't be seen outside of the package/scope it's > in. A pack

Re: lexical scoping under mod perl solution

2009-02-12 Thread Michael Peters
Erik Aronesty wrote: (A solution would be to force all "my" varialbes at the file scope to be "our" and then put the cgi in an anonymous package:) A file/package-scoped "my" var is not the same thing as an "our" var. One example is that a "my" var can't be seen outside of the package/scope it'

Re: lexical scoping under mod perl solution

2009-02-12 Thread Adam Prime
Erik Aronesty wrote: (A solution would be to force all "my" varialbes at the file scope to be "our" and then put the cgi in an anonymous package:) On Thu, Feb 12, 2009 at 10:33 AM, Erik Aronesty wrote: -8<-- Start Bug Report 8<-- 1. Problem Description: