Name
new
Synopsis
new($uri
, [$scheme
])
Constructor. $
uri
is given as an argument with
the optional $
scheme
. new
removes additional whitespace,
double quotes, and arrows from the URL. $
scheme
is used only when $
str
is a relative URI; it is a
simple string that denotes the scheme or an absolute URI
object. $
str
will be treated like a generic
URI if $
scheme
isn’t defined.
Get Perl in a Nutshell, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.