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