Adding MooseX::Getopt first draft
[gitmo/MooseX-Getopt.git] / lib / MooseX / Getopt / OptionTypes.pm
1
2 package MooseX::Getopt::OptionTypes;
3 # this maps option types to Moose types
4
5 my %option_types = (
6     'Bool'     => '!',
7     'Str'      => '=s',
8     'Int'      => '=i',
9     'Float'    => '=f',
10     'ArrayRef' => '=s@',
11 );
12
13 sub has_option_type { exists $option_types{$_[1]} }
14 sub get_option_type {        $option_types{$_[1]} }
15
16 1;
17
18 __END__
19
20
21 =pod
22
23 =head1 NAME
24
25 MooseX::Getopt::OptionTypes - 
26
27 =head1 SYNOPSIS
28
29 =head1 DESCRIPTION
30
31 =head1 METHODS
32
33 =over 4
34
35 =item B<has_option_type>
36
37 =item B<get_option_type>
38
39 =item B<add_option_type>
40
41 =back
42
43 =head1 BUGS
44
45 All complex software has bugs lurking in it, and this module is no 
46 exception. If you find a bug please either email me, or add the bug
47 to cpan-RT.
48
49 =head1 AUTHOR
50
51 Stevan Little E<lt>stevan@iinteractive.comE<gt>
52
53 =head1 COPYRIGHT AND LICENSE
54
55 Copyright 2007 by Infinity Interactive, Inc.
56
57 L<http://www.iinteractive.com>
58
59 This library is free software; you can redistribute it and/or modify
60 it under the same terms as Perl itself.
61
62 =cut