diff options
author | Olaf Alders <olaf@wundersolutions.com> | 2019-01-08 14:46:12 -0500 |
---|---|---|
committer | Olaf Alders <olaf@wundersolutions.com> | 2019-01-08 14:46:12 -0500 |
commit | a0bfba6508f132a214bf41f453b003cd283097e6 (patch) | |
tree | 92ba8c1caea3b9bae22273c1cc535123a80b9aea | |
parent | 8b2f756d129c5ea0304dcd63f3b054aa4e62562c (diff) | |
download | uri-a0bfba6508f132a214bf41f453b003cd283097e6.tar.gz |
URI-1.75v1.75
- $uri->canonical unconditionally returns a clone (GH#58) (Dorian Taylor)
-rw-r--r-- | Changes | 2 | ||||
-rw-r--r-- | README.md | 8 |
2 files changed, 7 insertions, 3 deletions
@@ -1,6 +1,6 @@ Revision history for URI -{{$NEXT}} +1.75 2019-01-08 19:45:38Z - $uri->canonical unconditionally returns a clone (GH#58) (Dorian Taylor) 1.74 2018-04-22 12:30:44Z @@ -205,8 +205,12 @@ The common methods available for all URI are: uppercasing all escape sequences, and unescaping octets that can be better represented as plain characters. - For efficiency reasons, if the $uri is already in normalized form, - then a reference to it is returned instead of a copy. + Before version 1.75, this method would return the original unchanged + `$uri` object if it detected nothing to change. To make the return + value consistent (and since the efficiency gains from this behaviour + were marginal), this method now unconditionally returns a clone. This + means idioms like `$uri->clone->canonical` are no longer + necessary. - $uri->eq( $other\_uri ) - URI::eq( $first\_uri, $other\_uri ) |