|
NAMEMooX::Traits::Util - non-role alternative to MooX::TraitsSYNOPSISGiven some roles:package Role; use Moo::Role; has foo => ( is => 'ro', required => 1 ); And a class: package Class; use Moo; Apply the roles to the class: use MooX::Traits::Util -all; my $class = new_class_with_traits('Class', 'Role'); Then use your customized class: my $object = $class->new( foo => 42 ); $object->isa('Class'); # true $object->does('Role'); # true $object->foo; # 42 DESCRIPTIONThis module provides the functionality of MooX::Traits, but it's an exporter rather than a role.It's inspired by, but not compatible with MooseX::Traits::Util. The latter module is undocumented, and it's not entirely clear whether it's intended to be consumed by end-users, or is an entirely internal API. This module exports nothing by default. Functions
BUGSPlease report any bugs to <http://rt.cpan.org/Dist/Display.html?Queue=MooX-Traits>.SEE ALSOMooX::Traits.AUTHORToby Inkster <tobyink@cpan.org>.COPYRIGHT AND LICENCEThis software is copyright (c) 2014 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. DISCLAIMER OF WARRANTIESTHIS 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.
Visit the GSP FreeBSD Man Page Interface. |