Mite::Manual::MOP - integration with the Moose Meta-Object Protocol.
To enable Moose integration, you need to provide a "mop" setting in your .mite/config file:
Then when mite compile is run, Mite will write a bunch of metadata about your classes and roles to lib/Your/Project/MOP.pm.
Now your project has Moose-compatibility!
Loading Your::Project::MOP will instantly "promote" all your classes and roles to Moose classes and roles.
Third parties can now use Moose to extend your project.
has sku => ( is => 'ro', isa => 'Str' );
If you decide to enable Moose integration for your project, it will still have zero non-core dependencies for normal usage, but loading the MOP.pm file will require Moose and Type::Tiny, plus any type libraries you used (such as Types::Standard, Types::Common::String, and Types::Common::Numeric).
Just try to make sure that in normal usage MOP.pm never gets loaded.
If Moose integration is enabled, all your classes and roles will have a meta method, similar to the one provided by Moose.
Calling $class->meta, $role->meta, or $object->meta on any of your Mite classes/roles/objects will load MOP.pm.
Please report any bugs to https://github.com/tobyink/p5-mite/issues.
Michael G Schwern <email@example.com>.
Toby Inkster <firstname.lastname@example.org>.
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.
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.
To install Mite, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.