URI::URL(3)

🌸 NAME 🌸

okay so this is URI::URL(3) β€” yes bestie, the manual name is right there β€” aka URI::URL β€” Uniform Resource Locators, coming at you from the User Contributed Perl Documentation aisle πŸ’–. She's iconic, she's old-school, and she's here to explain the URL vibes.

✨ SYNOPSIS ✨

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

πŸ’… 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. No cap β€” she's literally the legacy-compat bestie 🫢.

The following differences exist compared to the URI class interface:

  • URI::URL exports the url() function as an alternate constructor interface β€” a whole second way to pull up, iykyk ✨.
  • The constructor takes an optional $base argument. The URI::URL class is a subclass of URI::WithBase β€” family tree slay 🌳.
  • The URI::URL->newlocal class method is the same as URI::file->new_abs.
  • URI::URL::strict(1) β€” it's a whole thing, bestie πŸ’….
  • $url->print_on method β€” yes, that method exists.
  • $url->crack method β€” also real, don't come for me.
  • $url->full_path: same as ($uri->abs_path || "/") β€” literally that.
  • $url->netloc: same as $uri->authority.
  • $url->epath, $url->equery: same as $uri->path, $uri->query.
  • $url->path and $url->query pass unescaped strings β€” unescaped, bestie, that's the vibe 😭.
  • $url->path_components: same as $uri->path_segments (if you don't consider path segment parameters).
  • $url->params and $url->eparams methods β€” both of them, mwah πŸ’‹.
  • $url->base method. See URI::WithBase β€” go look, she's right there πŸ‘€.
  • $url->abs and $url->rel have an optional $base argument. See URI::WithBase.
  • $url->frag: same as $uri->fragment.
  • $url->keywords: same as $uri->query_keywords.
  • $url->localpath and friends map to $uri->file β€” the whole friend group 🫢.
  • $url->address and $url->encoded822addr: same as $uri->to for mailto URI.
  • $url->groupart method for news URI β€” news girlies rise 🌈.
  • $url->article: same as $uri->message.

πŸ‘€ SEE ALSO πŸ‘€

URI, URI::WithBase β€” yes, both of them, go read, bestie πŸ“šβœ¨.

Copyright 1998-2000 Gisle Aas.


πŸ’– this page is running on perl v5.42.0, dated 2026-09-02 β€” mwah, bestie, that's the sign-off πŸ’‹πŸ’…

πŸ“¦ where this page comes from