2 package MooseX::Getopt::Parser::Default;
6 use MooseX::Getopt::Parser::Long;
7 use maybe 'MooseX::Getopt::Parser::Descriptive';
12 return maybe::HAVE_MOOSEX_GETOPT_PARSER_DESCRIPTIVE
13 ? MooseX::Getopt::Parser::Descriptive->new(@_)
14 : MooseX::Getopt::Parser::Long->new(@_);
27 MooseX::Getopt::Parser::Default - A default parser for MooseX::Getopt
31 use MooseX::Getopt::Parser::Default;
33 my $parser = MooseX::Getopt::Parser::Default->new( config => ['pass_through'] );
34 my $getopt = MooseX::Getopt::Session->new( parser => $parser );
35 my $app = My::App->new( getopt => $getopt );
39 This class contains the factory method which returns new
40 L<MooseX::Getopt::Parser> object. The object's class is
41 L<MooseX::Getopt::Parser::Descriptive> if L<Getopt::Long::Descriptive>
42 module exists or L<MooseX::Getopt::Parser::Long> otherwise.
48 =item B<new (%params)>
50 This is the factory method which returns new L<MooseX::Getopt::Parser>
51 object. All C<%params> are passed to new object.
57 All complex software has bugs lurking in it, and this module is no
58 exception. If you find a bug please either email me, or add the bug
65 =item L<MooseX::Getopt::Parser>
67 =item L<MooseX::Getopt::Parser::Long>
69 =item L<MooseX::Getopt::Parser::Descriptive>
75 Piotr Roszatycki, E<lt>dexter@cpan.orgE<gt>
77 =head1 COPYRIGHT AND LICENSE
79 Copyright 2007-2008 by Infinity Interactive, Inc.
81 L<http://www.iinteractive.com>
83 This library is free software; you can redistribute it and/or modify
84 it under the same terms as Perl itself.