URI::WithBase(3)
πΈ NAME πΈ
okay so bestie, the manual name is URI::WithBase, and it's literally URIs which remember their base π
β¨
β¨ SYNOPSIS β¨
$u1 = URI::WithBase->new($str, $base);
$u2 = $u1->abs;
$base = $u1->base;
$u1->base( $new_base )
π DESCRIPTION π
This module provides the URI::WithBase class. Objects of this class are like URI objects, but they can keep their base too π«Ά The base represents the context where this URI was found, and it can be used to absolutize or relativize the URI. All the methods described in URI are supported for URI::WithBase objects. periodt.
The methods provided in addition to or modified from those of URI are:
$uri = URI::WithBase->new($str, [$base])β the constructor, bestie π It takes an optional base URI as the second argument. If provided, this argument initializes thebaseattribute.$uri->base( [$new_base] )β get or set the value of thebaseattribute. The return value, which is the old value, is a URI object orundefπ$uri->abs( [$base_uri] )β the$base_uriargument is now made optional as the object carries its base with it β¨ A new object is returned even if$uriis already absolute (while plainURIobjects simply return themselves in that case). not me calling out plainURIlike that π$uri->rel( [$base_uri] )β the$base_uriargument is now made optional as the object carries its base with it π A new object is always returned.
π SEE ALSO π
URI β go check it out, iykyk π
π COPYRIGHT π
Copyright 1998-2002 Gisle Aas.
π cute lil sign-off: this page is fromperl v5.42.0, dated2026-09-02, and it's literallyURI::WithBase(3). mwah π«Άβ¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-URI 5.310.0-160000.3.1 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms