I'm trying to work with Moose on a new project.<br><br>My habit in recent years has been to use Getopt::Long to parse command line arguments, and Pod::Usage to display short --help or very long --man POD output.<br><br>
So I want to use MooseX::Getopt to parse arguments which have been specified / described in Moose-ish style and Moosex::Getopt::GLD to store the command line argument documentation with the Moose attribute. <br><br>But I can't figure out how to use M::G::GLD. GLD, which I've never used, uses a single data structure to store all the arguments, and to associate a Getopt::Long style description, such as 'firstname=s' to specify --firstname accepting a string argument, and a description string, which, presumably, is output if documentation is required. Moose associates everything to do with one attribute in one place, which is the reverse of associating the getopt strings ans descriptions for all the args into one structure. So how are you supposed to specify things? How do you invoke it?<br>
<br>As well if you have an error in command line arguments, it generates an error message and dies. My past experience is to stick --help or --man on the command line, and view some helpful reminder to figure out what I was doing wrong. That's possible because Getopt::Long doesn't go beyond requiring an arg to be string or integer or float or bool. Type information and data subtypes are handled later. That allows an opportunity for POD::Usage to be invoked.<br>
<br>So what am i doing wrong, how do I do it right? I don't find Moose is generous with examples ... only a few examples used over and over, so if it doesn't answer your question there's nowhere to turn.<br><br>
<br>Tom<br>