> Is this not just a module which creates the necessary subs in the calling
   > package ? The catchall can be done with an AUTOLOAD sub.

That's certainly how Class::Delegation is implemented.

It isn't quite adequate however, because if you trigger the AUTOLOAD and
it *fails* to delegate, you can only invoke $self->SUPER::AUTOLOAD(),
which locks out any potential AUTOLOADS on *other* branches of the
inheritance tree. Of course, the NEXT:: pseudoclass would fix that
limitation too.

The reason I proposed it for the core is simple: speed.

No-one will use delegation unless it's fast, and it won't be fast
unless it's integrated with the dispatch mechanism.

Damian

Reply via email to