* MooseX::Getopt::Parser::*: default config for getopt is 'default'.
[gitmo/MooseX-Getopt.git] / lib / MooseX / Getopt / Parser.pm
CommitLineData
550da402 1
2package MooseX::Getopt::Parser;
3
4use Moose::Role;
c6c1f628 5requires 'build_options';
550da402 6
71;
ac2073c8 8
9__END__
10
11=pod
12
13=head1 NAME
14
15MooseX::Getopt::Parser - A Moose role for MooseX::Getopt's parser
16
17=head1 SYNOPSIS
18
19 package MooseX::Getopt::Parser::Descriptive;
20 use Moose;
21 with 'MooseX::Getopt::Parser';
22 sub build_options {
23 my $self = shift;
24 my ($getopt, @attrs) = @_;
25 Moose->throw_error('First argument is not a MooseX::Getopt::Session')
26 unless $getopt->isa('MooseX::Getopt::Session');
27
28 my $options = {};
29
30 # your code is here
31
32 return $options;
33 }
34
35=head1 DESCRIPTION
36
37This is a L<Moose> role for L<MooseX::Getopt>'s parser. The parser have
38to implement C<build_options> method which takes a
39L<MooseX::Getopt::Session> object and attributes list which will be
40filled by parser.
41
42=head1 BUGS
43
44All complex software has bugs lurking in it, and this module is no
45exception. If you find a bug please either email me, or add the bug
46to cpan-RT.
47
48=head1 SEE ALSO
49
50=over 4
51
52=item L<MooseX::Getopt>
53
54=item L<MooseX::Getopt::Parser::Long>
55
56=item L<MooseX::Getopt::Parser::Descriptive>
57
58=item L<MooseX::Getopt::Parser::Default>
59
60=back
61
62=head1 AUTHOR
63
64Piotr Roszatycki, E<lt>dexter@cpan.orgE<gt>
65
66=head1 COPYRIGHT AND LICENSE
67
68Copyright 2007-2008 by Infinity Interactive, Inc.
69
70L<http://www.iinteractive.com>
71
72This library is free software; you can redistribute it and/or modify
73it under the same terms as Perl itself.
74
75=cut