Commit | Line | Data |
550da402 |
1 | |
2 | package MooseX::Getopt::Parser; |
3 | |
4 | use Moose::Role; |
c6c1f628 |
5 | requires 'build_options'; |
550da402 |
6 | |
7 | 1; |
ac2073c8 |
8 | |
9 | __END__ |
10 | |
11 | =pod |
12 | |
13 | =head1 NAME |
14 | |
15 | MooseX::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 | |
37 | This is a L<Moose> role for L<MooseX::Getopt>'s parser. The parser have |
38 | to implement C<build_options> method which takes a |
39 | L<MooseX::Getopt::Session> object and attributes list which will be |
40 | filled by parser. |
41 | |
42 | =head1 BUGS |
43 | |
44 | All complex software has bugs lurking in it, and this module is no |
45 | exception. If you find a bug please either email me, or add the bug |
46 | to 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 | |
64 | Piotr Roszatycki, E<lt>dexter@cpan.orgE<gt> |
65 | |
66 | =head1 COPYRIGHT AND LICENSE |
67 | |
68 | Copyright 2007-2008 by Infinity Interactive, Inc. |
69 | |
70 | L<http://www.iinteractive.com> |
71 | |
72 | This library is free software; you can redistribute it and/or modify |
73 | it under the same terms as Perl itself. |
74 | |
75 | =cut |