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