1MooseX::Getopt::GLD(3)User Contributed Perl DocumentationMooseX::Getopt::GLD(3)
2
3
4
6 MooseX::Getopt::GLD - A Moose role for processing command line options
7 with Getopt::Long::Descriptive
8
10 ## In your class
11 package My::App;
12 use Moose;
13
14 with 'MooseX::Getopt::GLD';
15
16 has 'out' => (is => 'rw', isa => 'Str', required => 1);
17 has 'in' => (is => 'rw', isa => 'Str', required => 1);
18
19 # ... rest of the class here
20
21 ## in your script
22 #!/usr/bin/perl
23
24 use My::App;
25
26 my $app = My::App->new_with_options();
27 # ... rest of the script here
28
29 ## on the command line
30 % perl my_app_script.pl -in file.input -out file.dump
31
34 Copyright 2007-2009 by Infinity Interactive, Inc.
35
36 <http://www.iinteractive.com>
37
38 This library is free software; you can redistribute it and/or modify it
39 under the same terms as Perl itself.
40
41
42
43perl v5.12.0 2010-03-01 MooseX::Getopt::GLD(3)