This is my first real attempt at module creation and I decided to add one more area of training by learning about OO. As it turns out, adding the object oriented interface reduced the amount of code while making it more difficult for someone to muck around with the innards.
Great, but why do the people that use your module have to type Data::Dumper::Lite->new->Dump(...) when a simple change would allow them to write Dump ... instead?
In your module:
use Exporter::Tidy _map => { Dump => sub { __PACKAGE__->new->Dump(@_)
+} };
User's code:
use Data::Dumper::Lite qw(Dump);
print Dump(...);
Juerd
# { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }
|