The Perl 5 module AnyEvent::BDB is an AnyEvent user. Loading it will install the necessary magic to seamlessly integrate BDB into AnyEvent, i.e. you no longer need to concern yourself with calling BDB::poll_cb or any of that stuff.