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