8 use overload '""' => sub { shift->as_string };
11 my($class, $uri, $scheme) = @_;
14 uri => URI->new($uri, $scheme),
21 uri => $self->{uri}->clone,
27 return $self->{uri}->as_iri;
32 use vars qw($AUTOLOAD);
33 my $method = substr($AUTOLOAD, rindex($AUTOLOAD, '::')+2);
35 # We create the function here so that it will not need to be
36 # autoloaded the next time.
38 *$method = sub { shift->{uri}->$method(@_) };
42 sub DESTROY {} # avoid AUTOLOADing it