stas        01/12/04 18:22:25

  Modified:    lib/Apache Build.pm
               lib/ModPerl Code.pm
  Log:
  remove the caching of the noedit preamble and generate a
  fresh noedit header + trace for each invocation. the caching was wrong,
  since it was using the same trace for more than one place in the same
  package.
  
  Revision  Changes    Path
  1.75      +1 -4      modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.74
  retrieving revision 1.75
  diff -u -r1.74 -r1.75
  --- Build.pm  2001/11/22 03:46:47     1.74
  +++ Build.pm  2001/12/05 02:22:24     1.75
  @@ -417,11 +417,8 @@
       chmod 0755, $file;
   }
   
  -my $noedit_warning_hash;
  -
   sub noedit_warning_hash {
  -    $noedit_warning_hash ||=
  -      ModPerl::Code::noedit_warning_hash(__PACKAGE__);
  +    ModPerl::Code::noedit_warning_hash(__PACKAGE__);
   }
   
   sub save {
  
  
  
  1.73      +5 -9      modperl-2.0/lib/ModPerl/Code.pm
  
  Index: Code.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/lib/ModPerl/Code.pm,v
  retrieving revision 1.72
  retrieving revision 1.73
  diff -u -r1.72 -r1.73
  --- Code.pm   2001/11/24 01:15:01     1.72
  +++ Code.pm   2001/12/05 02:22:24     1.73
  @@ -555,8 +555,6 @@
       [(map { "$_.c" } @c_names), (map { "$_.h" } @h_names)];
   }
   
  -my %warnings;
  -
   sub classname {
       my $self = shift || __PACKAGE__;
       ref($self) || $self;
  @@ -564,12 +562,11 @@
   
   sub noedit_warning_c {
       my $class = classname(shift);
  -    my $warning = \$warnings{C}->{$class};
  -    return $$warning if $$warning;
  +
       my $v = join '/', $class, $class->VERSION;
       my $trace = Apache::TestConfig::calls_trace();
       $trace =~ s/^/ * /mg;
  -    $$warning = <<EOF;
  +    return <<EOF;
   
   /*
    * *********** WARNING **************
  @@ -586,10 +583,9 @@
   #non-Perl files, e.g. Makefile, typemap, etc.
   sub noedit_warning_hash {
       my $class = classname(shift);
  -    my $warning = \$warnings{hash}->{$class};
  -    return $$warning if $$warning;
  -    ($$warning = noedit_warning_c($class)) =~ s/^/\# /mg;
  -    $$warning;
  +
  +    (my $warning = noedit_warning_c($class)) =~ s/^/\# /mg;
  +    return $warning;
   }
   
   sub init_file {
  
  
  


Reply via email to