![]() |
![]()
| ![]() |
![]()
NAMEMooseX::Types::Set::Object - Set::Object type with coercions and stuff. VERSIONversion 0.05 SYNOPSISpackage Foo; use Moose; use MooseX::Types::Set::Object; has children => ( isa => "Set::Object", accessor => "transition_set", coerce => 1, # also accept array refs handles => { children => "members", add_child => "insert", remove_child => "remove", # See Set::Object for all the methods you could delegate }, ); # ... my $foo = Foo->new( children => [ @objects ] ); $foo->add_child( $obj ); DESCRIPTIONThis module provides a Moose type constraint (see Moose::Util::TypeConstraints, MooseX::Types). Note that this constraint and its coercions are global, not simply limited to the scope that imported it -- in this way it acts like a regular Moose type constraint, rather than one from MooseX::Types. TYPES
SEE ALSOSet::Object, MooseX::AttributeHandlers, MooseX::Types, Moose::Util::TypeConstraints AUTHORיובל קוג'מן (Yuval Kogman) <nothingmuch@woobling.org> CONTRIBUTORS
COPYRIGHT AND LICENSEThis software is copyright (c) 2008 by Yuval Kogman. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
|