When you say "any message after these words," does that include words
on subsequent lines?

If it does, there isn't much parsing left to do -- the rest of the
tokens in the stream get treated as a big diagnostic blob.

If it doesn't, the easiest thing to do would be to stop the parser and
complain. It would be really cool, as well as more work, if the parser
parsed the rest of the TAP. The latter would allow your parser to find
more than one error in the TAP. (Imagine the parser finding _two_
"Bail out!" lines.)

On 7/8/06, Ovid <[EMAIL PROTECTED]> wrote:
From TAP.pm:

--

Bail out!

As an emergency measure a test script can decide that further tests are useless 
(e.g. missing dependencies) and testing should stop immediately. In that case 
the test script prints the magic words

  Bail out!

to standard output. Any message after these words must be displayed by the 
interpreter as the reason why testing must be stopped, as in

  Bail out! MySQL is not running.

--

What should be the appropriate behavior for the TAPx::Parser?  (Namespace suggestions 
still wanted)  Should it stop lexing/parsing the output?  Should it check to see if 
there's additional output and spit out a different warning?  Should it just treat it as a 
"Bail out!" line and continue parsing like normal and let the code using the 
parser handle that?

  if ( $test->is_bail_out )  { ... }

Cheers,
Ovid

-- If this message is a response to a question on a mailing list, please send 
follow up questions to the list.

Web Programming with Perl -- http://users.easystreet.com/ovid/cgi_course/







--
Ian Langworth

Reply via email to