Mixin::ExtraFields::Hive - infest your objects with hives


version 0.008


  use Mixin::ExtraFields::Hive -hive => {
    moniker => 'registry',
    driver  => 'DBI',


This module provides a Data::Hive to other classes' objects as a mix-in, powered by Mixin::ExtraFields. It behaves like Mixin::ExtraFields, but generates a different set of methods. It can use any Mixin::ExtraFields driver.


This library should run on perls released even a long time ago. It should work on any version of perl released in the last five years.

Although it may work on older versions of perl, no guarantee is made that the minimum required version will not be increased. The version may be increased for any reason, and there is no promise that patches will be accepted to lower the minimum required perl.



The main export of this module is the hive method, generated by importing the -hive group. The method will be imported under the moniker given to the hive group. If this all sounds like Greek, you should probably re-read the Mixin::ExtraFields documentation. As a simple example, however, the code in the "Synopsis", above, would generate a registry method instead of a hive method.

This method will return a Data::Hive object for extra fields for the object on which it's called. At present, the Data::Hive object is recreated for each call to the hive method. In the future, it will be possible to cache these on the object or in some other manner.

other methods

At present, two support methods are installed by this mixin. These methods may go away in the future, when a more purpose-built subclass of Data::Hive::Store is used.

These methods are:

  _mutate_hive - acts as a combined get/set extra accessor
  _exists_hive - acts as the standard exists_extra method
  _empty_hive  - deletes all hive data
  _delete_hive - deletes a single hive entry


  • provide a customizable means to cache created Data::Hive objects


Ricardo Signes <>


Ricardo Signes <>


This software is copyright (c) 2007 by Ricardo Signes <>.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.