Vincent Moneymaker wrote:
Stas Bekman wrote:

I discovered what was causing the problem.  Even though I had used the
following in the startup.pl file

use Apache2::Const -compile => ':common';

the Apache modules were segfaulting on the straight 'OK' constant
declarations in them.

Vincent, what do you mean by 'declaration' here? You mean you've used it?


In modules where a constant such as 'OK' gets returned (like so)

sub handler {
  print "a\n";
  return OK;
}

I had to change the 'OK' constant to the following

sub handler {
  print "a\n"
  return Apache2::Const::OK;
}

You can't use OK, unless you do:

use Apache2::Const qw(OK);

in each module you use it. It needs to be imported.

Bear in mind that 'return OK' worked fine if I didn't change a module, but
if I changed something in the module like a print statement and
Apache2::Reload was on and the module was then reloaded, that is when the
segfault would occur

Also, if the module had a 'use Apache2::Const qw(OK);' statement, I had to
remove those like so

package Apache2::Menus;

#use Apache2::Const qw(OK);

sub handler {
  print "a\n";
  return Apache2::Const::OK;
}

So now, whenever I change a module, the change shows up and no segfault
occurs.  With respect to duplicating the problem, I will keep trying to
duplicate it in the test tarball that you sent me so that I can duplicate it
for you.

Great. Thanks. But post it to the list.

With regard to the reload problem where one *.pm file calls another *.pm
file but changes in the second *.pm file don't show up, I have fixed that
problem by using the old Apache::Reload code (i.e. version 0.08) where
Modperl::Util::unload_package doesn't get used.  Using that old code,
everything works fine.

Cool. So we know whose fault is that. Hopefully you will make up another tarball that reproduces this problem too. Thanks!



-- __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com

Reply via email to