The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Any::Moose - use Moose or Mouse modules

VERSION

version 0.09

SYNOPSIS

BASIC

    package Class;

    # uses Moose if it's loaded, Mouse otherwise
    use Any::Moose;

OTHER MODULES

    package Other::Class;
    use Any::Moose;

    # uses Moose::Util::TypeConstraints if the class has loaded Moose,
    # Mouse::Util::TypeConstraints otherwise.
    use Any::Moose '::Util::TypeConstraints';

COMPLEX USAGE

    package My::Meta::Class;
    use Any::Moose;

    # uses subtype from Moose::Util::TypeConstraints if the class loaded Moose,
    # subtype from Mouse::Util::TypeConstraints otherwise.
    # similarly for Mo*se::Util's does_role
    use Any::Moose (
        '::Util::TypeConstraints' => ['subtype'],
        '::Util' => ['does_role'],
    );

    # uses MouseX::Types
    use Any::Moose 'X::Types';

    # gives you the right class name depending on which Mo*se was loaded
    extends any_moose('::Meta::Class');

DESCRIPTION

Actual documentation is forthcoming, once we solidify all the bits of the API. The examples above are very likely to continue working.

AUTHORS

  Shawn M Moore <sartak@bestpractical.com>
  Florian Ragwitz <rafl@debian.org>
  Stevan Little <stevan@iinteractive.com>
  Tokuhiro Matsuno <tokuhirom@gmail.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2009 by Best Practical Solutions.

This is free software; you can redistribute it and/or modify it under the same terms as perl itself.