Badger::Debug

package Your::Forager;
use base 'Badger::Base';

sub forage {
    my ($self, $where, $what) = @_;
    $self->debug("Foraging in the $where for $what");
    # ... do some foraging...
}
Thus Spake Andy:

Debugging goes hand-in-hand with error handling. The debug() method provides a simple way to generate a debugging message. The debugging functionality is defined in Badger::Debug, but Badger::Base brings it in automatically. The reasons it's defined as a separate mixin is so that you can use Badger::Debug if you want debugging functionality without having to always subclass from Badger::Base.