whoops. sorry. the first snippet is not supposed to have the undef(*$cv)
in it. the actual code in Symbol.pm looks like this:
for my $cv (@functions) {
no strict 'refs';
next if substr($cv, 0, 14) eq "Devel::Symdump";
next if $skip and $cv =~ /$skip/;
#warn "$cv=", *{$cv}{CODE}, "\n";
Apache::Symbol::undef(*{$cv}{CODE});
}
"Andrei A. Voropaev" wrote:
>
> Are you sure you gave the snippets right? Because
> undef(*$cv);
> is present in both of them. So your problem seems to be in calling
> Apache::Symbol::undef(*{$cv}{CODE});
>
> Seems like after that call undef(*$cv) doesn't work properly.
>
> Andrei
>
> On Thu, Nov 18, 1999 at 12:12:16PM -0800, Jeff Elo wrote:
> > Hi All,
> >
> > I am currently helping some friends convert their site over to mod_perl,
> > and they are experiencing some problems due to the fact that they use
> > function prototypes. Whenever they change a function prototype, mod_perl
> > complains that they have 'too few' or 'too many' arguments for the
> > function.
> > I tried including Apache::Symbol so that undef_functions would get
> > called, but the problem persisted. I looked into the Apache::Symbol
> > code, and found the chunk in undef_functions that does the actual
> > undef'ing:
> >
> > for my $cv (@functions) {
> > no strict 'refs';
> > next if substr($cv, 0, 14) eq "Devel::Symdump";
> > next if $skip and $cv =~ /$skip/;
> > #warn "$cv=", *{$cv}{CODE}, "\n";
> > Apache::Symbol::undef(*{$cv}{CODE});
> > undef(*$cv);
> > }
> >
> >
> > It looks like the problem is that it is undef'ing the code of the
> > procedure, but not the procedure's symbol table function name entry
> > itself (which seems to carry the prototype information).
> > So I modified it so that it undef's everything:
> >
> > next if substr($cv, 0, 14) eq "Devel::Symdump";
> > next if $skip and $cv =~ /$skip/;
> > #warn "$cv=", *{$cv}{CODE}, "\n";
> >
> > # we want everything undef'd, not just the code
> > undef(*$cv);
> > }
> >
> > Things seem to work ok now, but my question is this:
> >
> > Is the above modification going to have any adverse effects?
> > Why in the original are the symbol table function name entries left
> > around and not undef'd entirely?
> >
> >
> > Thanks,
> > --
> > -jeff elo
>
> --
--
-jelo