in reply to Re: Forwarding functions to a different module
in thread Forwarding functions to a different module

I'm not clear on your constraint not to use 'bless', but the @ISA behavior works without bless.

This was my misunderstanding. I thought @ISA works only when a function is called indirectly via a blessed reference! I will try out whether your suggestion works also in my context (the difficulty is that my module will be used as mixin together with other modules, in order to form one big class, using Class::MixinFactory, and I don't know yet to what extent this effects package lookup (maybe it would be a good idea to study MixinFactory a bit).

-- 
Ronald Fischer <ynnor@mm.st>
  • Comment on Re^2: Forwarding functions to a different module

Replies are listed 'Best First'.
Re^3: Forwarding functions to a different module
by chromatic (Archbishop) on Aug 08, 2008 at 06:52 UTC
    I thought @ISA works only when a function is called indirectly via a blessed reference!

    You were close. It only works for method dispatch. (Constructor calls use method dispatch even though they lack references of any kind, blessed or otherwise.)

Re^3: Forwarding functions to a different module
by tod222 (Pilgrim) on Aug 09, 2008 at 01:04 UTC
    The A Class is Simply a Package section of perlobj explains how @ISA and inheritance work. I should have linked it in my earlier post.

    I'd recommend reviewing all of perlobj, not just the section mentioned above.