http://www.perlmonks.org?node_id=1222173

nysus has asked for the wisdom of the Perl Monks concerning the following question:

I have a cpan module with the following tests that has failed smoke testing on a Windows machine. It is choking on these tests:

stderr_like { `bin/anki_import` } qr/usage: anki_import FILE/, 'dies w +ithout file'; stderr_like { `bin/anki_import blasdfah` } qr/[FATAL].*does not exist/ +, 'dies with bad file'; lives_ok { `bin/anki_import t/data/source.anki` } 'can process good fi +le';

Looks like Windows is getting confused by the forward slash. Here is the reported error:

# Failed test 'dies without file' # at t/02-cli.t line 22. # STDERR: # 'bin' is not recognized as an internal or external command, # operable program or batch file.

Do I need to detect the OS and write a special command for Windows? Maybe I can just cd into the bin and execute from there? What's the best fix for this?

$PM = "Perl Monk's";
$MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest";
$nysus = $PM . ' ' . $MCF;
Click here if you love Perl Monks