Badger::Exporter Hooks
package NewSkool::Constants; use strict; use warnings; use base 'Badger::Exporter'; use constant { MESSAGE => 'Hello World!', VOLUME => 11, TRUE => 1, FALSE => 0, }; our $VERSION = 2.718; __PACKAGE__->exports( all => 'MESSAGE', any => 'VOLUME', tags => { truth => 'TRUE FALSE' }, hooks => { mushroom => sub { ... }, snake => sub { ... }, }, fail => sub { ... }, );
Thus Spake Andy:
Adding custom export hooks is easy. You can also define a catch-all handler.