Subject: | pod directive to skip Test::Synopsis |
Date: | Sat, 12 Dec 2009 07:15:58 +1100 |
To: | bug-Test-Synopsis [...] rt.cpan.org |
From: | Kevin Ryde <user42 [...] zip.com.au> |
It'd be good if it was possible within the pod of a file to tell
Test::Synopsis that the code is no good and should be skipped.
I know individual synopsis_ok() calls could omit selected bad files, but
I think it'd be easier to keep a badness indicator in a file. If you
update the offending synopsis code in the future then you don't have to
remember to also change the .t script.
I got the effect I wanted from
=for test_synopsis 1;
=for test_synopsis __END__
which chops off the evalled code. Perhaps there's a cleaner way.
Including a "1;" in the evalled string could allow just an __END__.
A cute possibility could be to have an __END__ or similar part-way
through the synopsis code, if for example the first half is good, but
the second half doomed (for whatever reason -- too much pseudocode,
unavailable modules, etc).
Are the "=for test_synopsis" bits shuffled up to the start of the
evalled string currently? Keeping them in sequence with the displayed
code could be more logical.