raku-community-modules / URI

Raku realization of URI — Uniform Resource Identifiers handler
Artistic License 2.0
3 stars 14 forks source link

relative and absolute are incorrect #9

Closed jdv closed 9 years ago

jdv commented 9 years ago

I would assume the relative and absolute accesssors should indicate that aspect of the uri as a whole as their name implies. They currently seem to be confusing the uri and its path portion. I don't understand this line in particular:

$!is_absolute = ?($!path || $!scheme);

See https://tools.ietf.org/html/rfc3986#section-4.2.

ronaldxs commented 9 years ago

I don't think p5 URI.pm provides a functions that identify whether a URI is absolute or relative. I converted from the regex version to the grammar version of URI and sort of blindly carried the "absolute" and "relative" functions forward with the translation. The functions come from some old code and AFAICT other URI libraries don't provide the functionality. I think the functions should be deprecated and then removed.

The definition I put in my version sort of confused absolute URI's and absolute paths.

ronaldxs commented 9 years ago

Patch/PR to fix this now applied ...