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 Thu, 01 Oct 1998 18:25:35 GMT
dougm       98/10/01 11:25:35

  Modified:    .        Changes ToDo
               lib/Apache PerlRun.pm
  Log:
  Apache::PerlRun::handler changes:
   - PerlRunOnce option
   - don't localize %INC, just remove new, non-.pm files
  
  Revision  Changes    Path
  1.166     +5 -0      modperl/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /export/home/cvs/modperl/Changes,v
  retrieving revision 1.165
  retrieving revision 1.166
  diff -u -r1.165 -r1.166
  --- Changes	1998/10/01 03:21:43	1.165
  +++ Changes	1998/10/01 18:25:28	1.166
  @@ -8,6 +8,11 @@
   
   =item 1.15_02-dev
   
  +Apache::PerlRun::handler changes:
  +
  + - PerlRunOnce option
  + - don't localize %INC, just remove new, non-.pm files
  +
   fix bug that would hose child if a croak() happened, be it from a
   syntax error, Carp::croak(), etc.  remove child_terminate() hack that
   was blaming the Perl stack being corrupt
  
  
  
  1.95      +10 -4     modperl/ToDo
  
  Index: ToDo
  ===================================================================
  RCS file: /export/home/cvs/modperl/ToDo,v
  retrieving revision 1.94
  retrieving revision 1.95
  diff -u -r1.94 -r1.95
  --- ToDo	1998/10/01 03:15:51	1.94
  +++ ToDo	1998/10/01 18:25:29	1.95
  @@ -3,12 +3,18 @@
                    (well, close to it anyhow)
   ---------------------------------------------------------------------------
   
  -- need to re-think Apache::PerlRun's local %INC
  -  (maybe Apache::PerlRun::handler should just child_exit()?)
  +- forking under Apache::Registry, exit vs CORE::exit 
   
  -- turn of strip of httpd during 'make install'
  +- DirectoryIndex breaks now that we accept DIR_MAGIC_TYPE
  +
  +- PerlInitHandler broken?
   
  -- $ENV{PATH}
  +- files that have been created after the server's (child?) startup are
  +  being reported with negative age with -M test under Apache::Registry. 
  +  The workaround is to add $^T = time; at the beginning of the scripts. But
  +  it would be much better if the Apache::Registry will do that 
  +
  +- turn of strip of httpd during 'make install'
   
   - 'make htmldoc' (Brian Moseley)
   
  
  
  
  1.10      +22 -2     modperl/lib/Apache/PerlRun.pm
  
  Index: PerlRun.pm
  ===================================================================
  RCS file: /export/home/cvs/modperl/lib/Apache/PerlRun.pm,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- PerlRun.pm	1998/09/22 15:33:40	1.9
  +++ PerlRun.pm	1998/10/01 18:25:34	1.10
  @@ -261,8 +261,7 @@
       $pr->set_script_name;
       $pr->chdir_file;
       my $line = $pr->mark_line;
  -    local %INC = %INC;
  -
  +    my %orig_inc = %INC;
       my $eval = join '',
   		    'package ',
   		    $package,
  @@ -273,7 +272,17 @@
       $rc = $pr->compile(\$eval);
   
       $pr->chdir_file("$Apache::Server::CWD/");
  +    #in case .pl files do not declare package ...;
  +    for (keys %INC) {
  +	next if $orig_inc{$_};
  +	next if /\.pm$/;
  +	delete $INC{$_};
  +    }
   
  +    if(my $opt = $r->dir_config("PerlRunOnce")) {
  +	$r->child_terminate if lc($opt) eq "on";
  +    }
  +
       {   #flush the namespace
   	no strict;
   	%{$package.'::'} = ();
  @@ -322,6 +331,17 @@
   have been pre-loaded at server startup time.  This module is meant for
   "Dirty" CGI Perl scripts which relied on the single request lifetime
   of CGI and cannot run under B<Apache::Registry> without cleanup.
  +
  +=head1 CAVEATS
  +
  +If your scripts still have problems running under the I<Apache::PerlRun>
  +handler, the I<PerlRunOnce> option can be used so that the process running
  +the script will be shutdown.  Add this to your httpd.conf:
  +
  + <Location ...>
  + PerlSetVar PerlRunOnce On
  + ...
  + </Location>
   
   =head1 SEE ALSO
   
  
  
  

Mime
View raw message