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

Another possibility would be to create an abstract class with
sub dumper { die 'Dumper not defined in the abstract class!' }
then subclass it with MyClass::Dumper where you override the sub:
use Data::Dumper; sub dumper { my ($self, @data) = @_; print Data::Dumper::Dumper(@data); }
If the user wants to use a different Dumper, they can subclass the abstract class with a different implementation of the dumper.
map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.