Hi, On Tue, 21 Sep 2004, Geoffrey Young wrote:
> 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 Thanks for the information. If I understand correctly then it is thus a bug in CGI.pm (it uses $r->headers_in without doing use APR::Table). Maybe it would be possible to include this in the documentation, as it is not clear at this moment. E.g. on http://perl.apache.org/docs/2.0/api/Apache/RequestRec.html it is not shown in the synopsis (the code in the synopsis will generate the error as well). > > 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. I'm used to the "maybe you forgot to load" hints in case a module is not present at all, hence me missing the obvious. Yes, I'm spoiled :-) Kind regards, -- Sebastiaan Hoogeveen <[EMAIL PROTECTED]> NederHost http://www.nederhost.nl Fax: 020 - 4095 982 -- 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