in reply to Re: Subclassing, done right?
in thread Subclassing, done right?

I think, you've already solved it.

I was already unsure if I need to use the whole slew of modules Net::DAV::Server uses, but with my thin knowledge of subclassing, I thought using "use base" would just like a "use <some module>" magically import/load all the used modules as well.
Your post now indicates that this is not so.
I did not post the actual error message in the first place as I though it wouldn't be helpful, but as I remember, it also pointed to the piece of code you are referring to.
I am not actually receiving an error, the whole thing simply is returning an error. Sorry, but debugging helpers do not provide more insight into the actual output, yet.

So please confirm for me as a learning monk: "use base" will only magically import functions for me, used modules need to be repeated in the wrapping module, here Foo.pm, right?

Replies are listed 'Best First'.
Re^3: Subclassing, done right?
by Corion (Patriarch) on Aug 06, 2010 at 16:39 UTC

    If you look at the source code for base or parent or read perltoot, you will find that inheritance in Perl does not work by copying subroutines. While it is conceptually not very far from copying the subroutines, actually Perl goes searching for methods of that name in the packages listed in @ISA until it finds one. No importing of subroutines is done.

Re^3: Subclassing, done right?
by isync (Hermit) on Aug 06, 2010 at 16:37 UTC
    After duplicating the module loads in my wrapping module, thus dumbly expecting my copy and paste to work, I now know - it doesn't work..

      So, maybe you'd like to help us help you better?

      Posting the actual error message you get and the actual script you write will maybe let us help you better.

        .. I know. But providing an example, as this is a client-server-system, would mean having to duplicate various levels of scripts and a CGI env.