logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

MooseX::Types::Set::Object - Set::Object type with coercions and stuff.

Author

       XXXX XXX'XX (Yuval Kogman) <nothingmuch@woobling.org>

Contributors

       •   Karen Etheridge <ether@cpan.org>

       •   Florian Ragwitz <rafl@debian.org>

Description

       This 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.

Name

       MooseX::Types::Set::Object - Set::Object type with coercions and stuff.

See Also

       Set::Object, MooseX::AttributeHandlers, MooseX::Types, Moose::Util::TypeConstraints

Synopsis

           package 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 );

Types

       Set::Object
           A subtype of "Object" that isa Set::Object with coercions to and from the "ArrayRef" type.

Version

       version 0.05

See Also