You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl-cvs@perl.apache.org by ge...@apache.org on 2005/02/14 19:39:38 UTC

cvs commit: modperl/src/modules/perl mod_perl.c

geoff       2005/02/14 10:39:38

  Modified:    .        Changes
               src/modules/perl mod_perl.c
  Log:
  Display a more verbose message if Apache.pm can't be loaded
  
  Revision  Changes    Path
  1.690     +3 -0      modperl/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /home/cvs/modperl/Changes,v
  retrieving revision 1.689
  retrieving revision 1.690
  diff -u -r1.689 -r1.690
  --- Changes	14 Jan 2004 20:07:18 -0000	1.689
  +++ Changes	14 Feb 2005 18:39:37 -0000	1.690
  @@ -10,6 +10,9 @@
   
   =item 1.30_01-dev
   
  +Display a more verbose message if Apache.pm can't be loaded
  +[Geoffrey Young]
  +
   Fix incorrect win32 detection in Apache::SizeLimit reported by 
   Matt Phillips <mp...@virage.com> [Philippe M. Chiasson]
   
  
  
  
  1.148     +9 -2      modperl/src/modules/perl/mod_perl.c
  
  Index: mod_perl.c
  ===================================================================
  RCS file: /home/cvs/modperl/src/modules/perl/mod_perl.c,v
  retrieving revision 1.147
  retrieving revision 1.148
  diff -u -r1.147 -r1.148
  --- mod_perl.c	2 Oct 2003 21:30:35 -0000	1.147
  +++ mod_perl.c	14 Feb 2005 18:39:37 -0000	1.148
  @@ -513,8 +513,15 @@
   
       require_Apache(NULL);
   
  -    if(!(version = perl_get_sv("Apache::VERSION", FALSE)))
  -	croak("Apache.pm failed to load!"); /*should never happen*/
  +    if(!(version = perl_get_sv("Apache::VERSION", FALSE))) {
  +        /* should never happen but might if the perl mod_perl
  +         * was built with isn't around anymore
  +         */
  +	croak("Apache.pm failed to load! (%s)",
  +                  SvTRUE(ERRSV) ? SvPV(ERRSV,na) : "no error?"
  +              );
  +    }
  +
       if(strEQ(SvPV(version,n_a), MP_APACHE_VERSION)) /*no worries*/
   	return;