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