I am slowly learning about OO from Tom's tutorial, and was able to do inheritance with two dummy classes I wrote, including adding methods to the subclass and have them work too. However, when I tried to inherit from Apache::Request, it doesn't seem to work right. Maybe this isn't an Apache::Request issue, so forgive me if that's the case, but here's what I got:
FooBar.pm --------------------------------------------- package FooBar; use strict; use Apache::Request(); @FooBar::ISA = qw(Apache::Request); sub fooey { print "hello world, I'm in FooBar"; } --------------------------------------------- Handler.pm --------------------------------------------- sub handler { my $r = shift; $r->send_http_header('text/html'); my $form = FooBar->new($r); $form->fooey; $r->exit(OK); } Here's the error I get: [Thu Feb 14 12:35:14 2002] [error] Can't locate object method "fooey" via package "Apache::Request" (perhaps you forgot to load "Apache::Request"?) at /path/modified/Handler.pm line 21.