my ($scheme, $auth, $path, $query, $_frag) = uri_split($$self);
$path =~ s!\A/+!/!; # excessive leading slash
+ # upper-case uidvalidity= and uid= parameter names
+ $path =~ s/;([^=]+)=([^;]*)/;\U$1\E=$2/g;
+
# lowercase the host portion
$auth =~ s#\A(.*@)?(.*?)(?::([0-9]+))?\z#
my $ret = ($1//'').lc($2);
sub as_string { ${$_[0]} }
+sub clone { ref($_[0])->new(as_string($_[0])) }
+
1;