URI::URL(3) User Contributed Perl Documentation URI::URL(3)

# [NAME](#NAME)

URI::URL - Uniform Resource Locators

# [SYNOPSIS](#SYNOPSIS)

```
 $u1 = URI::URL->new($str, $base);
 $u2 = $u1->abs;
```

# [DESCRIPTION](#DESCRIPTION)

This module is provided for backwards compatibility with modules that depend on the interface provided by the "URI::URL" class that used to be distributed with the libwww-perl library.

The following differences exist compared to the "URI" class interface:

- The URI::URL module exports the **url()** function as an alternate constructor interface.
- The constructor takes an optional $base argument. The "URI::URL" class is a subclass of "URI::WithBase".
- The URI::URL-&gt;newlocal class method is the same as URI::file-&gt;new\_abs.
- [**URI::URL::strict**(1)](/man/os/perl-uri/URI::URL::strict.1)
- $url-&gt;print\_on method
- $url-&gt;crack method
- $url-&gt;full\_path: same as ($uri-&gt;abs\_path || "/")
- $url-&gt;netloc: same as $uri-&gt;authority
- $url-&gt;epath, $url-&gt;equery: same as $uri-&gt;path, $uri-&gt;query
- $url-&gt;path and $url-&gt;query pass unescaped strings.
- $url-&gt;path\_components: same as $uri-&gt;path\_segments (if you don't consider path segment parameters)
- $url-&gt;params and $url-&gt;eparams methods
- $url-&gt;base method. See URI::WithBase.
- $url-&gt;abs and $url-&gt;rel have an optional $base argument. See URI::WithBase.
- $url-&gt;frag: same as $uri-&gt;fragment
- $url-&gt;keywords: same as $uri-&gt;query\_keywords
- $url-&gt;localpath and friends map to $uri-&gt;file.
- $url-&gt;address and $url-&gt;encoded822addr: same as $uri-&gt;to for mailto URI
- $url-&gt;groupart method for news URI
- $url-&gt;article: same as $uri-&gt;message

# [SEE ALSO](#SEE_ALSO)

URI, URI::WithBase

# [COPYRIGHT](#COPYRIGHT)

Copyright 1998-2000 Gisle Aas.

2026-10-19 perl v5.44.0

---

Document: URI::URL(3pm) from perl-uri 5.38-r0 (Chainguard OS)
Source: https://github.com/libwww-perl/URI.git
