The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

MouseX::AttributeHelpers::Collection::Bag

SYNOPSIS

    package MyClass;
    use Mouse;
    use MouseX::AttributeHelpers;

    has 'word_histogram' => (
        metaclass => 'Collection::Bag',
        is        => 'rw',
        isa       => 'Bag', # exported
        default   => sub { +{} },
        provides  => {
            add    => 'add_word',
            get    => 'get_count_for',            
            empty  => 'has_any_words',
            count  => 'num_words',
            delete => 'delete_word',
        },
    );

DESCRIPTION

This module provides an Hash attribute which provides a number of hash-like operations.

PROVIDERS

This module also consumes the ImmutableHash method providers. See also MouseX::AttributeHelpers::Collection::ImmutableHash.

add

delete

reset

METHODS

method_constructors

helper_type

helper_default

AUTHOR

NAKAGAWA Masaki <masaki@cpan.org>

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

MouseX::AttributeHelpers, MouseX::AttributeHelpers::Base, MouseX::AttributeHelpers::Collection::ImmutableHash