2 package MooseX::Getopt::Parser::Default;
4 our $VERSION = '0.150001';
8 use MooseX::Getopt::Parser::Long;
9 use maybe 'MooseX::Getopt::Parser::Descriptive';
14 return maybe::HAVE_MOOSEX_GETOPT_PARSER_DESCRIPTIVE
15 ? MooseX::Getopt::Parser::Descriptive->new(@_)
16 : MooseX::Getopt::Parser::Long->new(@_);
29 MooseX::Getopt::Parser::Default - A default parser for MooseX::Getopt
33 use MooseX::Getopt::Parser::Default;
35 my $parser = MooseX::Getopt::Parser::Default->new( config => ['pass_through'] );
36 my $getopt = MooseX::Getopt::Session->new( parser => $parser );
37 my $app = My::App->new( getopt => $getopt );
41 This class contains the factory method which returns new
42 L<MooseX::Getopt::Parser> object. The object's class is
43 L<MooseX::Getopt::Parser::Descriptive> if L<Getopt::Long::Descriptive>
44 module exists or L<MooseX::Getopt::Parser::Long> otherwise.
50 =item B<new (%params)>
52 This is the factory method which returns new L<MooseX::Getopt::Parser>
53 object. All C<%params> are passed to new object.
59 All complex software has bugs lurking in it, and this module is no
60 exception. If you find a bug please either email me, or add the bug
67 =item L<MooseX::Getopt::Parser>
69 =item L<MooseX::Getopt::Parser::Long>
71 =item L<MooseX::Getopt::Parser::Descriptive>
77 Piotr Roszatycki, E<lt>dexter@cpan.orgE<gt>
79 =head1 COPYRIGHT AND LICENSE
81 Copyright 2007-2008 by Infinity Interactive, Inc.
83 L<http://www.iinteractive.com>
85 This library is free software; you can redistribute it and/or modify
86 it under the same terms as Perl itself.