=pod

=head1 NAME

Mite::Manual::Missing - major Moose features not supported by Mite

=head1 MANUAL

=head2 Run-Time Class/Role Building

Your constructor, destructor, and accessors are build on the developer's
machine when C<< mite compile >> is run, rather than at run-time on the
end user's machine like L<Moose>, L<Mouse>, and L<Moo> do. Role application
is mostly performed during C<< mite compile >> too, with the exception of
applying method modifiers, and checking that C<requires> is satisfied,
which happens at run-time.

This means any run-time logic used to construct your classes and roles
is unlikely to work. As an example:

    package Your::Project::SomeClass;
    use Your::Project::Mite;
    
    if ( $ENV{YOUR_PROJECT_DEBUG} ) {
        with 'Your::Project::Trait::Verbose';
    }
    
    ...;
    
    1;

Best case scenario, this will work, but it's the value of C<YOUR_PROJECT_DEBUG>
on the developer's machine when they run C<< mite compile >> which is honoured,
and becomes hard-coded into the generated class. Worst case scenario, things
break in interesting and unusual ways.

Logic which is guaranteed to run the same on both the developer's machine
and the end user's machine should be fine. For example, this should be fine:

    for my $attr ( qw( foo bar baz ) ) {
        has $attr => (
            reader => "get_$attr",
            writer => "set_$attr",
        );
    }

However Mite provides a lot of shortcuts which Moose doesn't, so you're less
likely to need that sort of logic anyway. You could just write:

    has [ qw( foo bar baz ) ] => (
        reader => 'get_%s',
        writer => 'set_%s',
    );

Or even:

    has [ qw( foo bar baz ) ] => (
        reader => true,
        writer => true,
    );

And it will work the same!

If you do need to be able to construct your classes and roles at run time,
switch to L<Moose> or L<Moo>.

=head1 BUGS

Please report any bugs to L<https://github.com/tobyink/p5-mite/issues>.

=head1 AUTHOR

Michael G Schwern E<lt>mschwern@cpan.orgE<gt>.

Toby Inkster E<lt>tobyink@cpan.orgE<gt>.

=head1 COPYRIGHT AND LICENCE

This software is copyright (c) 2011-2014 by Michael G Schwern.

This software is copyright (c) 2022 by Toby Inkster.

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

=head1 DISCLAIMER OF WARRANTIES

THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.

=cut
