NAME

MouseX::Types::Enum - Object-oriented, Java-like enum type declaration based on Mouse

SYNOPSIS

In the following example,

If you have no need to define instance variables, you can declare enums more simply like following.

{
    package Day;

    use MouseX::Types::Enum qw/
        Sun
        Mon
        Tue
        Wed
        Thu
        Fri
        Sat
    /;

    __PACKAGE__->meta->make_immutable;
}

Day->Sun == Day->Sun;   # 1
Day->Sun == Day->Mon;   # ''
Day->Sun->to_string;    # 'APPLE'
Day->enums;             # { Sun => Day->Sun, Mon => Day->Mon, ... }

DESCRIPTION

MouseX::Types::Enum provides Java-like enum type declaration.

Enums declared are

LICENSE

Copyright (C) Naoto Ikeno.

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

AUTHOR

Naoto Ikeno ikenox@gmail.com