> I did use those modules (reported version 0.01 for both though). However,
> I found that the problem can be fixed in an even more obvious way, e.g. by
> including:
> 
>  PerlModule APR::Table
> 
> in my httpd.conf. It seems that this module is not "use"d by
> Apache::RequestRec so it must be pulled in by the handler itself - I'm not
> sure whether that constitutes a bug, an error in documentation or me being
> someone who didn't read the documentation well enough.

that you are required to use() the classes that provide the methods you
require in your handler is by design.  you can search the dev@ archives for
lots of discussions on this particular issue.  see also
ModPerl::MethodLookup and some notes in an article I wrote some time ago
(the first of a brief series on mp2):

  http://www.perl.com/pub/a/2003/04/17/filters.html

> 
> Imvho a module returning an APR::Table object should use the package
> implementing the object (thus, Apache::RequestRec should "use
> APR::Table"). Since this is how I am used to be working with packages and
> Perl was not hinting that APR::Table was not loaded at all I overlooked
> the obvious.

Perl was giving you the correct hints:

[Tue Sep 21 10:49:41 2004] [error] [client 130.89.164.70] Can't locate
object method "FETCH" via package "APR::Table" at
/home/sebastiaan/test/lib/perl5/5.8.2/CGI/Cookie.pm line 76.\n

which is the same error you would receive running code like this:

  my $f = bless {}, 'Foo';
  $f->bar;

yeah, it could be more intuitive, but perl is in charge of throwing the
errors here, so we have to live with the error perl chooses to provide.

--Geoff

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