NAME

MouseX::Getopt::Meta::Attribute::Getopt - Optional meta attribute for custom options

SYNOPSIS

package MyApp;
use Mouse;

with 'MouseX::Getopt';

has 'data' => (
    metaclass => 'Getopt',
    is        => 'rw',
    isa       => 'Str',

    # use --somedata as the command line flag
    # instead of the normal flag (--data)
    cmd_flag => 'somedata',

    # also allow --somedata, -s, and -d as aliases
    cmd_aliases => ['somedata', 's', 'd'],
);

DESCRIPTION

This module is a custom attribute metaclass for providing a command line flag to use instead of the default flag.

ATTRIBUTES

cmd_flag

Changes the default command line flag to this value.

cmd_aliases

Adds command line flag aliases, useful for short options.

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.