Perhaps this is a dumb idea, but after reading the entire thread, there are several good points. Difficulty of parsing, tying the parser too close to the format, what are you going to do with the output... Basically, I suggest that you have an option to dump the data in a hash in Data::Dumper (or similar) format, so that other programs can just *load* the data. Then you could provide a subroutine that dumps it in the aforementioned format for compatibility sake. If people want other odd formats, they could easily load the data structure and generate what they want. You might structure it something like this: (Note: I've never used Data::Dumper and am unfamiliar with its output)
$results = {
'scripts' => {
't/qrt.t' => {
'Status' => 'OK', 'Stat' => '9', 'Wstat' => '2048',
'Total' => '12', 'Fail => '0', 'FailList' => { }
},
't/bar.t' => {
'Status' => 'Failed', 'Stat' => '4', 'Wstat' => '1024',
'Total' => '13', 'Fail => '4', 'FailList' => {
'2' => 'Failed msg 2', '6' => 'Failed msg 6',
'7' => 'Failed msg 7', '8' => 'Failed msg 8'
}
},
't/foo.t' => {
'Status' => 'Failed', 'Stat' => '1', 'Wstat' => '256',
'Total' => '10', 'Fail => '1', 'FailList' => {
'5' => 'Unexpectedly Succeeded'
}
}
},
'time' => '0 wallclock secs ( 0.10 cusr + 0.01 csys = 0.11 CPU)'
};
Roboticus