Ovid wrote:
> Yeah, I can deal with all of this.  I think the main thing is that any
> YAML diagnostics which accept arbitrary keys added will have to:
> 
> a.  Reject any key matching /^[[:lower:]]/ (or is /^[a-z]/ really preferred 
> here?)

The simple ASCII/UTF8 a-z avoids wacky locale issues which is what caused an
otherwise simple process to break down last time.  I think we can safely
promise that we're not going to put ümlauts in our keys.  If anyone wants to
translate TAP into another language that's their own can of worms.

The important thing to remember is the purpose of us staking out a claim on
certain diagnostic keys.  Its just so we don't clash with user defined ones in
the future.  The worst that can happen is someone outputs a lower case key
which later is assigned meaning.  Previously it was just being displayed as a
key/value pair.  Now its, for example, associating the test with a file.  But
its just a display issue, clearly the test author's mistake and they had fair
and simple warning.

What you absolutely do not want to do is have your TAP displayer throw out
test data (never letting the user see it) just because its not strictly
compliant.  Throwing out test data is the worst thing you can do.

You don't have to reject them, they just have no special meaning.  Just
display them like any other key/value pair.  If you want to be strict, throw a
warning, but realize that its going to make it annoying to output keys for
slightly different versions of TAP with slightly different sets of official
keys.  You don't want test authors or even TAP libraries to be writing 'if TAP
version >= X then "foo" else "Foo"' like they do with MakeMaker.  It goes
against "TAP is simple to write".  So I'd make it a non-default option.


> b.  For now, just let people add arbitrary data for diagnostics.
> 
>   ---
>   have: 3
>   want: 4
>   file: t/foo.t
>   line: 17
>   user: ???
>   ...
> 
> Start small.  Grow later.

Yes, it would be silly to turn on strictures now.


-- 
101. I am not allowed to mount a bayonet on a crew-served weapon.
    -- The 213 Things Skippy Is No Longer Allowed To Do In The U.S. Army
           http://skippyslist.com/list/

Reply via email to