You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Boysenberry Payne <bo...@humaniteque.com> on 2005/08/12 19:04:34 UTC

Quick and Easy scoping question

I a module written in an object orient syntax that does this:

sub new {

	my $class = shift;
	my $this  = {};
	bless( $this, $class );
	$this->_init( @_ );
	
	return $this;
}

Is $this considered Global (i.e. am I going to run into the scoping 
issues
of $this->{data} persisting for multiple users?)

Boysenberry

boysenberrys.com | habitatlife.com | selfgnosis.com


Re: Quick and Easy scoping question

Posted by Frank Wiles <fr...@wiles.org>.
On Fri, 12 Aug 2005 12:04:34 -0500
Boysenberry Payne <bo...@humaniteque.com> wrote:

> I a module written in an object orient syntax that does this:
> 
> sub new {
> 
> 	my $class = shift;
> 	my $this  = {};
> 	bless( $this, $class );
> 	$this->_init( @_ );
> 	
> 	return $this;
> }
> 
> Is $this considered Global (i.e. am I going to run into the scoping 
> issues
> of $this->{data} persisting for multiple users?)

  This is actually a Perl question and not a mod_perl specific one, but
  no you won't run into scoping problems. 

 ---------------------------------
   Frank Wiles <fr...@wiles.org>
   http://www.wiles.org
 ---------------------------------