That module is only 30 lines of actual code and it is broken.
There is a FIXME note in the
source
$opt->{doc} || ' ', # FIXME new GLD shouldn't need this hack
which lead me to try
#!/usr/bin/perl --
BEGIN {
package My::App;
BEGIN { $INC{'My/App.pm'} = __FILE__; }
use Moose;
with 'MooseX::Getopt::GLD';
has 'out' => (is => 'rw', isa => 'Str', required => 1, doc => "yo"
+, );
has 'in' => (is => 'rw', isa => 'Str', required => 1, doc => "yo
+ho", );
}
#!/usr/bin/perl --
use My::App;
my $app = My::App->new_with_options();
but that doesn't work (
Found unknown argument(s) passed to 'in' attribute constructor in 'Moose::Meta::Attribute': doc)
Related bug
#47865: Help and usage don't seem to work with Getopt::Long::Descriptive
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.