perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From do...@hyperreal.org
Subject cvs commit: modperl/lib/Apache PerlRun.pm
Date Fri, 26 Mar 1999 19:08:56 GMT
dougm       99/03/26 11:08:56

  Modified:    .        Changes
               lib/Apache PerlRun.pm
  Log:
  new Apache::PerlRun::flush_namespace method to undef() each [SAHC]V
  entry, rather than a blind clear (which triggered cores, e.g. sort)
  
  Revision  Changes    Path
  1.268     +3 -0      modperl/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /home/cvs/modperl/Changes,v
  retrieving revision 1.267
  retrieving revision 1.268
  diff -u -r1.267 -r1.268
  --- Changes	1999/03/08 23:42:48	1.267
  +++ Changes	1999/03/26 19:08:53	1.268
  @@ -8,6 +8,9 @@
   
   =item 1.18_01-dev
   
  +new Apache::PerlRun::flush_namespace method to undef() each [SAHC]V
  +entry, rather than a blind clear (which triggered cores, e.g. sort)
  +
   $r->custom_response will now return the current ErrorDocument
   
   Semicolon support in $r->args [ Eric Cholet <cholet@logilune.com> ]
  
  
  
  1.15      +24 -10    modperl/lib/Apache/PerlRun.pm
  
  Index: PerlRun.pm
  ===================================================================
  RCS file: /home/cvs/modperl/lib/Apache/PerlRun.pm,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- PerlRun.pm	1999/01/21 00:38:22	1.14
  +++ PerlRun.pm	1999/03/26 19:08:55	1.15
  @@ -282,18 +282,32 @@
   	$r->child_terminate if lc($opt) eq "on";
       }
   
  -    {   #flush the namespace
  -	no strict;
  -	my $tab = \%{$package.'::'};
  -        foreach (keys %$tab) {
  -	    if(defined &{$tab->{$_}}) {
  -		undef_cv_if_owner($package, \&{$tab->{$_}});
  -	    } 
  -	}
  -	%$tab = ();
  -    }
  +    $pr->flush_namespace($package);
   
       return $rc;
  +}
  +
  +sub flush_namespace {
  +    my($self, $package) = @_;
  +    $package ||= $self->namespace;
  +
  +    no strict;
  +    my $tab = \%{$package.'::'};
  +
  +    for (keys %$tab) {
  +	if(defined &{ $tab->{$_} }) {
  +	    undef_cv_if_owner($package, \&{ $tab->{$_} });
  +	} 
  +        if(defined %{ $tab->{$_} }) {
  +            %{ $tab->{$_} } = undef;
  +        }
  +        if(defined @{ $tab->{$_} }) {
  +            @{ $tab->{$_} } = undef;
  +        }
  +        if(defined ${ $tab->{$_} }) {
  +	    ${ $tab->{$_} } = undef;
  +        }
  +     }
   }
   
   sub undef_cv_if_owner {
  
  
  

Mime
View raw message