If @$cmd is causing the problem, you should identify what's going on (see below). You could then try to invoke the
program with the given arguments to dive into the problem (hopefully %ENV was not modified and the files used still exist!).
However, you could add
- note "Now running '@$cmd'..."; and/or
- ok(...) or diag "Getting from (@$cmd): stdout=... stderr=..."; (Diagnostics)
to narrow down the problem. Use i.e.
prove -v ... which shows all
note(...)'s.
You colud also add more logging to the modules/scripts under test (e.g
Log::Log4perl).