Apache::Symbol-calling none-can('undef_functions')

2002-02-07 Thread Sreeji K Das

Hi
The following
perl -MDevel::Symdump -e '$t =
Devel::Symdump-new(main); print $t-packages, \n;'

in perl 5.6.1 returns none as one the packages !
Apache::Symbol (mod_perl-1.26) seems to call a
'can('undef_function..' on this values  as a result,
a fatal error is thrown ! I have done a 'next if
/\none\/' in Apache::Symbol to work around this.

There is no problem in perl-5.005. No one else faced
similar problem ? BTW, all this is in Solaris 2.6

Sreeji



__
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com



Re: Apache::Symbol-calling none-can('undef_functions')

2002-02-07 Thread Geoffrey Young

Sreeji K Das wrote:
 
 Hi
 The following
 perl -MDevel::Symdump -e '$t =
 Devel::Symdump-new(main); print $t-packages, \n;'
 
 in perl 5.6.1 returns none as one the packages !
 Apache::Symbol (mod_perl-1.26) seems to call a
 'can('undef_function..' on this values  as a result,
 a fatal error is thrown ! I have done a 'next if
 /\none\/' in Apache::Symbol to work around this.
 
 There is no problem in perl-5.005. No one else faced
 similar problem ? BTW, all this is in Solaris 2.6

I guess you're using Apache::StatINC?  from the recesses of my memory,
I think that only Apache::StatINC uses Apache::Symbol, and in perl
5.6.0 the need for Apache::Symbol was removed, since subroutine
redefined warnings were made not-mandatory.

at any rate, if you're using Apache::StatINC you can probably just
move to Apache::Reload to avoid the problem.  other than that, I'm not
sure what to tell you - I can't recall anyone else reporting this
problem...

--Geoff



Re: Apache::Symbol-calling none-can('undef_functions')

2002-02-07 Thread Jim Smith

On Thu, Feb 07, 2002 at 08:09:57AM -0500, Geoffrey Young wrote:
 Sreeji K Das wrote:
  
  Hi
  The following
  perl -MDevel::Symdump -e '$t =
  Devel::Symdump-new(main); print $t-packages, \n;'
  
  in perl 5.6.1 returns none as one the packages !
  Apache::Symbol (mod_perl-1.26) seems to call a
  'can('undef_function..' on this values  as a result,
  a fatal error is thrown ! I have done a 'next if
  /\none\/' in Apache::Symbol to work around this.
  
  There is no problem in perl-5.005. No one else faced
  similar problem ? BTW, all this is in Solaris 2.6
 
 I guess you're using Apache::StatINC?  from the recesses of my memory,
 I think that only Apache::StatINC uses Apache::Symbol, and in perl
 5.6.0 the need for Apache::Symbol was removed, since subroutine
 redefined warnings were made not-mandatory.
 
 at any rate, if you're using Apache::StatINC you can probably just
 move to Apache::Reload to avoid the problem.  other than that, I'm not
 sure what to tell you - I can't recall anyone else reporting this
 problem...

I did find yesterday that Apache::Status + Devel::Symdump can cause
Apache to segfault on Solaris 2.7 with Perl 5.6.1, mod_perl 1.26,
apache 1.3.22.  Not sure why yet.  I'm just avoiding the combination
for now :/  (Basically, let this serve as a warning so people aren't
surprised if they see it.)

I also get the following at times:

Bizarre copy of ARRAY in aassign at 
/usr/local/lib/perl5/site_perl/5.6.1/Devel/Symdump.pm line 53.

Probably should post to p5p or something if I can gather more information.

--jim



Re: Apache::Symbol-calling none-can('undef_functions')

2002-02-07 Thread Geoffrey Young

Sreeji K Das wrote:
 
 Hi
 
 Well, it's only a small part of my big problem :-(
 I'm trying to get PerlFreshRestart working. I had been
 banging my head against it for almost 5 days  I was
 thinking about preparing a small test case  posting.
 
 Well I want apache to load all my perl stuff on
 restart (USR1) - so I enabled PerlFreshRestart (I
 don't want Apache to stat modules on every request).
 Since I was getting 'subroutine redefined' warnings, I
 had put
 'PerlRestartHandler Apache::Symbol' - you got the
 reason for the problem ?
 
 I'm having hell lot of problems with PerlFreshRestart.

you will :)  see 

http://perl.apache.org/guide/troubleshooting.html#Evil_things_might_happen_when_us

and the rest of the guide for more details.

just FYI, but Apache::Reload is much better at reloading scripts, and
has features that can do pretty much what you want.

HTH

--Geoff



PerlFreshRestart (Was: Re: Apache::Symbol-calling none-can('undef_functions'))

2002-02-07 Thread Sreeji K Das

Hi 
True, I had already read that doc  also the
'Namespace' collision docs. However, there's no name
space collission in my scripts since:
1) The entire code with same config. works with old
mod_perl+perl+apache combo.
2) The errors that I get are like 'Undefined
subroutine File::Basename::basename called at ...'
Just before this if I check
File::Basename-can('basename') I get true  if check
%INC, File/Basename.pm exists there. I also did an
explict symbol table check (using glob)  found that
the function is there ! But funnily perl says it's
undefined subroutine ! The actual module  method
names change randomly, even if I run with -X !
 
As for Apache::Reload, the problem is it's going to
stat all the files, which I don't want. Alternatively,
I'll have to put use Apcahe::Reload, which again is a
problem, since I have to modify many files  they all
would be unnecessarily stat'ed. I just want Apache to
load all the modules, when I give a USR1 - I'm really
stuck at this !
(Another option I read somewhere is to compile
mod_perl as a DSO, in which case for every restart the
entire perl interp. is torn down  reloaded - may be
I'll look into that)

Thanx
Sreeji

--- Geoffrey Young [EMAIL PROTECTED] wrote:
 Sreeji K Das wrote:
  
  Hi
  
  Well, it's only a small part of my big problem :-(
  I'm trying to get PerlFreshRestart working. I had
 been
  banging my head against it for almost 5 days  I
 was
  thinking about preparing a small test case 
 posting.
  
  Well I want apache to load all my perl stuff on
  restart (USR1) - so I enabled PerlFreshRestart (I
  don't want Apache to stat modules on every
 request).
  Since I was getting 'subroutine redefined'
 warnings, I
  had put
  'PerlRestartHandler Apache::Symbol' - you got the
  reason for the problem ?
  
  I'm having hell lot of problems with
 PerlFreshRestart.
 
 you will :)  see 
 

http://perl.apache.org/guide/troubleshooting.html#Evil_things_might_happen_when_us
 
 and the rest of the guide for more details.
 
 just FYI, but Apache::Reload is much better at
 reloading scripts, and
 has features that can do pretty much what you want.
 
 HTH
 
 --Geoff 

__
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com