zostay / RakuWAPI

The Web API for Raku (RakuWAPI)
Artistic License 2.0
24 stars 5 forks source link

Consider using a Junction for p6sgix.protocol.upgrade #26

Closed zostay closed 8 years ago

zostay commented 8 years ago

While putting my slides for PPW together, I realized that p6sgix.protocol.upgrade probably makes more sense as a junction than anything else. If it's just a list, the most obvious Perl 6 way to test for it is to convert it to a junction:

if any(|%env<p6sgix.protocol.upgrade>) ~~ 'h2c' { ... }

Seems like we could skip the conversion if this were already a junction.

zostay commented 8 years ago

I've changed it to a set, I think that's a good compromise for this.