in reply to dynamic method creation, dispatch table or pseudo methods?

If providing implementation is part of the API, you might want to have better control about user errors

you could do something like (untested)

sub my_meth { my $self = shift; my $cmd = $self->{api_meth}; unless ( defined $cmd ) { # default } else { eval { $cmd->(@_) } or raise_error(); } }
Of course this will be slower than your suggestions...

TIMTOWTDI and YMMV :)

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery