in reply to dynamic method creation, dispatch table or pseudo methods?
then subclass it with MyClass::Dumper where you override the sub:sub dumper { die 'Dumper not defined in the abstract class!' }
If the user wants to use a different Dumper, they can subclass the abstract class with a different implementation of the dumper.use Data::Dumper; sub dumper { my ($self, @data) = @_; print Data::Dumper::Dumper(@data); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
| A reply falls below the community's threshold of quality. You may see it by logging in. |