You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Stas Bekman <st...@stason.org> on 2001/12/14 05:01:09 UTC

[patch] more wrongly cached autogeneration trace fixes

- don't cache the autogeneration warning  (it's not the same because of
the generation trace)

Index: lib/ModPerl/WrapXS.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/lib/ModPerl/WrapXS.pm,v
retrieving revision 1.36
diff -u -r1.36 WrapXS.pm
--- lib/ModPerl/WrapXS.pm	2001/11/28 17:05:56	1.36
+++ lib/ModPerl/WrapXS.pm	2001/12/14 03:59:17
@@ -26,12 +26,6 @@
        glue_dirs => [xs_glue_dirs()],
     }, $class;

-    for (qw(c hash)) {
-        my $w = "noedit_warning_$_";
-        my $method = "ModPerl::Code::$w";
-        $self->{$w} = $self->$method();
-    }
-
     $self->typemap->get;
     $self;
 }
@@ -298,8 +292,10 @@
     local $Data::Dumper::Terse = 1;
     $deps = Dumper $deps;

+    my $noedit_warning = $self->ModPerl::Code::noedit_warning_hash();
+
     print $fh <<EOF;
-$self->{noedit_warning_hash}
+$noedit_warning

 use lib qw(../../../lib); #for Apache::BuildConfig
 use ModPerl::MM ();
@@ -412,8 +408,8 @@
     my($self, $module, $functions) = @_;

     my $fh = $self->open_class_file($module, '.xs');
-    print $fh "$self->{noedit_warning_c}\n",
-              "\n#define MP_IN_XS\n\n";
+    print $fh $self->ModPerl::Code::noedit_warning_c(), "\n";
+    print $fh "\n#define MP_IN_XS\n\n";

     my @includes = @{ $self->includes };

@@ -493,9 +489,10 @@
     my $loader = join '::', $base, 'XSLoader';

     my $fh = $self->open_class_file($module, '.pm');
+    my $noedit_warning = $self->ModPerl::Code::noedit_warning_hash();

     print $fh <<EOF;
-$self->{noedit_warning_hash}
+$noedit_warning

 package $module;
 $isa
@@ -523,7 +520,7 @@
     my %seen;

     my $fh = $self->open_class_file('ModPerl::WrapXS', 'typemap');
-    print $fh "$self->{noedit_warning_hash}\n";
+    print $fh $self->ModPerl::Code::noedit_warning_hash(), "\n";

     while (my($type, $class) = each %$map) {
         $class ||= $type;
@@ -550,7 +547,7 @@
     my $file = join '/', $self->{XS_DIR}, $h;

     open my $fh, '>', $file or die "open $file: $!";
-    print $fh "$self->{noedit_warning_c}\n";
+    print $fh $self->ModPerl::Code::noedit_warning_c(), "\n";
     print $fh $code;
     close $fh;
 }



_____________________________________________________________________
Stas Bekman             JAm_pH      --   Just Another mod_perl Hacker
http://stason.org/      mod_perl Guide   http://perl.apache.org/guide
mailto:stas@stason.org  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: [patch] more wrongly cached autogeneration trace fixes

Posted by Doug MacEachern <do...@covalent.net>.
On Fri, 14 Dec 2001, Stas Bekman wrote:

> - don't cache the autogeneration warning  (it's not the same because of
> the generation trace)

+1



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org