NAME

Mooish::Base - importer for Mooish classes

SYNOPSIS

# for classes
use Mooish::Base;

# for roles
use Mooish::Base -role;

# create your class / role as usual

DESCRIPTION

This module is a shortcut that does roughly the same as calling these imports:

use Moo;
use Mooish::AttributeBuilder;
use Types::Common -types;
use namespace::autoclean;

If a -role flag is specified, then the module imports Moo::Role instead.

Environmental variables MOOISH_BASE_FLAVOUR and MOOISH_BASE_ROLE_FLAVOUR can be used to modify class and role systems used. If not present, Moo and Moo::Role will be used respectively. Make sure to introduce these variables before first loading the module.

The purpose of this module is to make it easier to create classes based on Moose family of modules. The choice of imported modules is meant to provide a solid base for module development, but still be perfectly compatible at least with Moose, Mouse and Moo.

Since this module imports Mooish::AttributeBuilder without the -standard flag, please do not use it as a dependency of other modules. You may use its code to create your own, similar importer.

SEE ALSO

Moo

Mooish::AttributeBuilder

Types::Common

Import::Into

AUTHOR

Bartosz Jarzyna <bbrtj.pro@gmail.com>

COPYRIGHT AND LICENSE

Copyright (C) 2025 by Bartosz Jarzyna

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