NAME

Reindeer::Builder - Easily build a new 'Reindeer' style class

VERSION

version 0.003

SYNOPSIS

package My::Reindeer;
use Reindeer::Builder
    also => {
        exclude => [ ... ], # packages from also
        add     => [ ... ],
    };

package My::Class;
use My::Reindeer;

# profit!
has foo => (...);

DESCRIPTION

Sometimes you need more than what Reindeer provides... And sometime less. Or there's a conflict with a default extension (e.g. a Catalyst controller with a config that will end up with unrecognized arguments passed to the constructor will blow up if MooseX::StrictConstructor is used).

Reindeer::Builder provides a simple interface to add additional extensions -- or filter the list of default extensions. It's intended to be used in a package of its own that can then be used in the same way Moose or Reindeer is in a package, to set up the metaclass and sugar.

ROLE OR CLASS?

If the package you're using Reindeer::Builder in ends with '::Role', we set up role metaclass and sugar.

ARGUMENTS

We take a set of name / hashref pairs. Right now we only support 'also' for names.

It is legal and supported to add and exclude at the same time.

also / exclude

If given, we expect exclude to be an arrayref of package names to be excluded from the list of extensions. (e.g. this filters what is passed to Moose::Exporter's 'also' argument.

e.g.

use Reindeer::Builder also => { exclude => 'MooseX::Something' };

also / add

If given, we expect add to be an arrayref of package names to be added to the list of extensions. (e.g. this augments what is passed to Moose::Exporter's 'also' argument.

e.g.

use Reindeer::Builder also => { add => 'MooseX::SomethingElse' };

SEE ALSO

Reindeer, Moose::Exporter.

AUTHOR

Chris Weyl <cweyl@alumni.drew.edu>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2011 by Chris Weyl.

This is free software, licensed under:

The GNU Lesser General Public License, Version 2.1, February 1999