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(@_);
26 MooseX::Getopt::Parser::Default - A default parser for MooseX::Getopt
30 use MooseX::Getopt::Parser::Default;
32 my $parser = MooseX::Getopt::Parser::Default->new( config => ['pass_through'] );
33 my $getopt = MooseX::Getopt::Session->new( parser => $parser );
34 my $app = My::App->new( getopt => $getopt );
38 This class contains the factory method which returns new
39 L<MooseX::Getopt::Parser> object. The object's class is
40 L<MooseX::Getopt::Parser::Descriptive> if L<Getopt::Long::Descriptive>
41 module exists or L<MooseX::Getopt::Parser::Long> otherwise.
47 =item B<new (%params)>
49 This is the factory method which returns new L<MooseX::Getopt::Parser>
50 object. All C<%params> are passed to new object.
56 All complex software has bugs lurking in it, and this module is no
57 exception. If you find a bug please either email me, or add the bug
64 =item L<MooseX::Getopt::Parser>
66 =item L<MooseX::Getopt::Parser::Long>
68 =item L<MooseX::Getopt::Parser::Descriptive>
74 Piotr Roszatycki, E<lt>dexter@cpan.orgE<gt>
76 =head1 COPYRIGHT AND LICENSE
78 Copyright 2007-2008 by Infinity Interactive, Inc.
80 L<http://www.iinteractive.com>
82 This library is free software; you can redistribute it and/or modify
83 it under the same terms as Perl itself.