Geoffrey Young wrote:
Having configured Apache::Status correctly and getting listings for the
various modules which are loaded, I came across a slight bug in
Apache::Status (line 102) where if there isn't a $VERSION in a module
Apache::Status barfs, I corrected this with a small fix from

  # if !$opt we skip the testing for the option
  return 0 if $opt && !status_config($r, $opt);
  return 0 unless eval { require $file };
  return 0 unless $module->VERSION >= $version;

to

  # if !$opt we skip the testing for the option
  return 0 if $opt && !status_config($r, $opt);
  return 0 unless eval { require $file };
  return 0 unless defined($module->VERSION);
  return 0 unless $module->VERSION >= $version;


from the looks of it, that function is for internal use only - it only
checks for the modules in $required, all of which should have versions.  but
stas would know more...

That bug was fixed in 1.99_17

I imagine this is because the hooks into Apache::Status in B::TerseSize
are somewhat out of date with regards to mod_perl 2, has anyone come
across this problem previously and come up with a solution ?


either use Apache::compat, or change

  Apache::Status->menu_item(
      'status_memory_usage' => "Memory Usage",
      \&status_memory_usage,
  ) if IS_MODPERL and Apache->module("Apache::Status");

to (the untested :)

  Apache::Status->menu_item(
      'status_memory_usage' => "Memory Usage",
      \&status_memory_usage,
  ) if IS_MODPERL and eval { require Apache::Module;
                             Apache::Module::loaded("Apache::Status");
                           };

or somesuch.

And that's fixed in the cvs version.

so get the cvs version and where both problems were already fixed:
http://perl.apache.org/download/source.html#Development_mod_perl_2_0_Source_Distribution


-- __________________________________________________________________ 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

--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Reply via email to