Skip Menu |
Report information
Id: 127039
Status: new
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: autarch <autarch [at] urth.org>
Cc:
AdminCc:

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Subject: Parsing of X<> formatting code is surprising
Download (untitled) / with headers
text/plain 697b
Given the Pod "X<pig|pigs; piggies ; porcine>" it's turned into the following object: Pod::FormattingCode.new(type => "X", meta => [["pigs"], [" piggies "], [" porcine"]], config => {}, contents => ["pig"]) I'm not sure exactly what I expect here, but it's not this. If the compiler is going to parse the semicolons, then shouldn't it also strip whitespace around the semicolons? S26 doesn't specifically mention whitespace, but it's example is "X<hash|hashes, definition of; associative arrays>" so it seems reasonable to strip leading and trailing whitespace from each term. Besides that, I don't see why meta is an array of single element arrays. I'd expect it to be an array of strings.
Download (untitled) / with headers
text/plain 277b
On Sat Dec 26 15:16:04 2015, autarch wrote: Show quoted text
> Besides that, I don't see why meta is an array of single element > arrays. I'd expect it to be an array of strings.
I note that when you have "X<foo|foos>" then the code's .meta is an array containing a single string, as expected.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org