1MooseX::Types::Set::ObjUescetr(3C)ontributed Perl DocumeMnotoasteiXo:n:Types::Set::Object(3)
2
3
4
6 MooseX::Types::Set::Object - Set::Object type with coercions and stuff.
7
9 package Foo;
10 use Moose;
11
12 use MooseX::Types::Set::Object;
13
14 has children => (
15 isa => "Set::Object",
16 accessor => "transition_set",
17 coerce => 1, # also accept array refs
18 handles => {
19 children => "members",
20 add_child => "insert",
21 remove_child => "remove",
22 # See Set::Object for all the methods you could delegate
23 },
24 );
25
26 # ...
27
28 my $foo = Foo->new( children => [ @objects ] );
29
30 $foo->add_child( $obj );
31
33 This module provides Moose type constraints (see
34 Moose::Util::TypeConstraints, MooseX::Types).
35
37 Set::Object
38 A subtype of "Object" that isa Set::Object with coercions to and
39 from the "ArrayRef" type.
40
42 Set::Object, MooseX::AttributeHandlers, MooseX::Types,
43 Moose::Util::TypeConstraints
44
46 This module is maintained using Darcs. You can get the latest version
47 from <http://nothingmuch.woobling.org/code>, and use "darcs send" to
48 commit changes.
49
51 Yuval Kogman <nothingmuch@woobling.org>
52
54 Copyright (c) 2008 Yuval Kogman. All rights reserved
55 This program is free software; you can redistribute
56 it and/or modify it under the same terms as Perl itself.
57
58
59
60perl v5.12.0 2008-06-26 MooseX::Types::Set::Object(3)