in reply to Re^2: Moo and command line scripts
in thread Moo and command line scripts

Yeah, it only becomes an issue if you're loading two classes that consume MooX::Role::CliOptions, and they each want different settings for the environment variable. None of your tests do that.

use 5.006; use strict; use warnings; use Test::More; { package My::Class1; use Moo; $ENV{MRC_NO_STDOPTS} = 1; # do NOT want 'debug' and 'verbose' with 'MooX::Role::CliOptions'; } { package My::Class2; use Moo; $ENV{MRC_NO_STDOPTS} = 0; # do want 'debug' and 'verbose' with 'MooX::Role::CliOptions'; } ok( ! My::Class1->new->can('verbose') ); ok( My::Class2->new->can('verbose') ); done_testing;