I was just trying to use &perl() in an ini file and ran across an
annoying restriction: I had to make the whole thing be one long line:
max_test_num = <<EOF
&perl('open(IN, "./mpi_test_suite -l|") || die("cant open"); while
(<IN>) { if (m/Num Tests : (\d+)/) { close(IN); return $1; } }
close(IN); return "0"; ')
EOF
Without that, the MTT parser would complain that it couldn't find the
closing ' quote (i.e., "&perl(' ... ')"). I tracked it down and
it's because if I did this:
max_test_num = <<EOF
&perl('
open(IN, "./mpi_test_suite -l|") || die("cant open");
while (<IN>) {
if (m/Num Tests : (\d+)/) { close(IN); return $1; }
}
close(IN);
return "0";
')
EOF
then the parser stops looking for the closing quote on the "&perl('"
line -- it doesn't go beyond the \n. Yuck.
Any suggestions?
--
Jeff Squyres
Cisco Systems