#!/usr/bin/perl use warnings; use strict; use feature qw{ say }; { package My; use Moose; extends 'MooseX::App::Cmd::Command'; with qw{ MooseX::Getopt::Usage }; has test => ( traits => [qw[ Getopt ]], isa => 'Bool', is => 'rw', cmd_aliases => 't', documentation => 'test me', ); sub execute { my ($self, $opt, $args) = @_; say $self->test; } __PACKAGE__->meta->make_immutable; } my $app = 'My'->new_with_options; #### script.pl --usage #### script.pl --test #### Required option missing: app #### ($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,