12:25 >set TEMP=.
12:25 >set TEMP
TEMP=.
12:26 >perl -T -MFile::Temp=tempfile -wE "say $ENV{TEMP}; tempfile();"
.
Error in tempfile() using template \XXXXXXXXXX: Could not create temp
+file \JFwYM0_6Kz: Permission denied at -e line 1.
12:26 >perl -T -MFile::Temp=tempfile -wE "$ENV{TEMP} = '.'; say $ENV{T
+EMP}; tempfile();"
.
12:26 >
So, I can get the tests for MooseX::App::Cmd to pass by hacking t/basic.t like this:
SKIP: {
my $have_TO = eval { require Test::Output; 1; };
print STDERR $@;
skip 'these tests require Test::Output', 5 unless $have_TO;
local @ARGV = qw(commands);
my $temp = $ENV{TEMP}; # ADDED
$ENV{TEMP} = '.'; # ADDED
my ($output) = Test::Output::output_from( sub { $cmd->run } );
$ENV{TEMP} = $temp; # ADDED
for my $name (qw(commands frobulate justusage stock bark)) {
like( $output, qr/^\s+\Q$name\E/sm, "$name plugin in listing"
+);
}
}
But I still don’t have a way to tweak the environment so that MooseX::App::Cmd installs “out of the box.”
Thanks for the help,
|