package MXGOTest; use Moose; use 5.010; with 'MooseX::Getopt'; has name => ( is => 'rw', isa => 'Str', required => 1); sub run { say "NAME=" . shift->{name}; } 1; #### $ perl mxgotest.pl --help Required option missing: name usage: mxgotest.pl [-?] [long options...] -? --usage --help Prints this usage information. --name