perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject cvs commit: modperl-2.0 Changes
Date Sun, 23 Nov 2003 21:26:01 GMT
stas        2003/11/23 13:26:01

  Modified:    ModPerl-Registry/lib/ModPerl PerlRun.pm Registry.pm
                        RegistryCooker.pm
               .        Changes
  Log:
  Fix ModPerl::Registry handlers family to modify $0 only for the
  duration of the handler, by localizing it
  
  Revision  Changes    Path
  1.7       +1 -1      modperl-2.0/ModPerl-Registry/lib/ModPerl/PerlRun.pm
  
  Index: PerlRun.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/lib/ModPerl/PerlRun.pm,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -u -r1.6 -r1.7
  --- PerlRun.pm	23 Mar 2003 04:52:24 -0000	1.6
  +++ PerlRun.pm	23 Nov 2003 21:26:01 -0000	1.7
  @@ -37,7 +37,7 @@
       cache_it        => 'NOP',
       read_script     => 'read_script',
       rewrite_shebang => 'rewrite_shebang',
  -    set_script_name => 'set_script_name',
  +    get_script_name => 'get_script_name',
       chdir_file      => 'chdir_file_normal',
       get_mark_line   => 'get_mark_line',
       compile         => 'compile',
  
  
  
  1.8       +1 -1      modperl-2.0/ModPerl-Registry/lib/ModPerl/Registry.pm
  
  Index: Registry.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/lib/ModPerl/Registry.pm,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -u -r1.7 -r1.8
  --- Registry.pm	23 Mar 2003 04:52:24 -0000	1.7
  +++ Registry.pm	23 Nov 2003 21:26:01 -0000	1.8
  @@ -37,7 +37,7 @@
       cache_it        => 'cache_it',
       read_script     => 'read_script',
       rewrite_shebang => 'rewrite_shebang',
  -    set_script_name => 'set_script_name',
  +    get_script_name => 'get_script_name',
       chdir_file      => 'chdir_file_normal',
       get_mark_line   => 'get_mark_line',
       compile         => 'compile',
  
  
  
  1.38      +10 -8     modperl-2.0/ModPerl-Registry/lib/ModPerl/RegistryCooker.pm
  
  Index: RegistryCooker.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/lib/ModPerl/RegistryCooker.pm,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -u -r1.37 -r1.38
  --- RegistryCooker.pm	30 Aug 2003 02:39:45 -0000	1.37
  +++ RegistryCooker.pm	23 Nov 2003 21:26:01 -0000	1.38
  @@ -173,7 +173,6 @@
       my $r       = $self->{REQ};
       my $package = $self->{PACKAGE};
   
  -    $self->set_script_name;
       $self->chdir_file;
   
       my $cv = \&{"$package\::handler"};
  @@ -356,10 +355,13 @@
   
       $self->strip_end_data_segment;
   
  +    my $script_name = $self->get_script_name || $0;
  +
       my $eval = join '',
                       'package ',
                       $self->{PACKAGE}, ";",
  -                    "sub handler {\n",
  +                    "sub handler {",
  +                    "local \$0 = '$script_name';",
                       $line,
                       ${ $self->{CODE} },
                       "\n}"; # last line comment without newline?
  @@ -568,15 +570,15 @@
   }
   
   #########################################################################
  -# func: set_script_name
  -# dflt: set_script_name
  -# desc: set $0 to the script's name
  +# func: get_script_name
  +# dflt: get_script_name
  +# desc: get the script's name to set into $0
   # args: $self - registry blessed object
  -# rtrn: nothing
  +# rtrn: path to the script's filename
   #########################################################################
   
  -sub set_script_name {
  -    *0 = \(shift->{FILENAME});
  +sub get_script_name {
  +    shift->{FILENAME};
   }
   
   #########################################################################
  
  
  
  1.260     +3 -0      modperl-2.0/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/Changes,v
  retrieving revision 1.259
  retrieving revision 1.260
  diff -u -u -r1.259 -r1.260
  --- Changes	22 Nov 2003 10:27:42 -0000	1.259
  +++ Changes	23 Nov 2003 21:26:01 -0000	1.260
  @@ -12,6 +12,9 @@
   
   =item 1.99_12-dev
   
  +Fix ModPerl::Registry handlers family to modify $0 only for the
  +duration of the handler, by localizing it [Stas]
  +
   Fix :Apache perlio's STDOUT to be reentrant + modules/include_subreq
   test [Stas]
   
  
  
  

Mime
View raw message