{
    "mode": "man",
    "parameter": "URI",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/man/URI/json",
    "generated": "2026-05-30T07:07:49Z",
    "synopsis": "use URI ();\n$u1 = URI->new(\"http://www.example.com\");\n$u2 = URI->new(\"foo\", \"http\");\n$u3 = $u2->abs($u1);\n$u4 = $u3->clone;\n$u5 = URI->new(\"HTTP://WWW.example.com:80\")->canonical;\n$str = $u->asstring;\n$str = \"$u\";\n$scheme = $u->scheme;\n$opaque = $u->opaque;\n$path   = $u->path;\n$frag   = $u->fragment;\n$u->scheme(\"ftp\");\n$u->host(\"ftp.example.com\");\n$u->path(\"cpan/\");",
    "sections": {
        "NAME": {
            "content": "URI - Uniform Resource Identifiers (absolute and relative)\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "use URI ();\n\n$u1 = URI->new(\"http://www.example.com\");\n$u2 = URI->new(\"foo\", \"http\");\n$u3 = $u2->abs($u1);\n$u4 = $u3->clone;\n$u5 = URI->new(\"HTTP://WWW.example.com:80\")->canonical;\n\n$str = $u->asstring;\n$str = \"$u\";\n\n$scheme = $u->scheme;\n$opaque = $u->opaque;\n$path   = $u->path;\n$frag   = $u->fragment;\n\n$u->scheme(\"ftp\");\n$u->host(\"ftp.example.com\");\n$u->path(\"cpan/\");\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This module implements the \"URI\" class.  Objects of this class represent \"Uniform Resource\nIdentifier references\" as specified in RFC 2396 (and updated by RFC 2732).\n\nA Uniform Resource Identifier is a compact string of characters that identifies an abstract\nor physical resource.  A Uniform Resource Identifier can be further classified as either a\nUniform Resource Locator (URL) or a Uniform Resource Name (URN).  The distinction between URL\nand URN does not matter to the \"URI\" class interface. A \"URI-reference\" is a URI that may\nhave additional information attached in the form of a fragment identifier.\n\nAn absolute URI reference consists of three parts:  a scheme, a scheme-specific part and a\nfragment identifier.  A subset of URI references share a common syntax for hierarchical\nnamespaces.  For these, the scheme-specific part is further broken down into authority, path\nand query components.  These URIs can also take the form of relative URI references, where\nthe scheme (and usually also the authority) component is missing, but implied by the context\nof the URI reference.  The three forms of URI reference syntax are summarized as follows:\n\n<scheme>:<scheme-specific-part>#<fragment>\n<scheme>://<authority><path>?<query>#<fragment>\n<path>?<query>#<fragment>\n\nThe components into which a URI reference can be divided depend on the scheme.  The \"URI\"\nclass provides methods to get and set the individual components.  The methods available for a\nspecific \"URI\" object depend on the scheme.\n",
            "subsections": []
        },
        "CONSTRUCTORS": {
            "content": "The following methods construct new \"URI\" objects:\n\n$uri = URI->new( $str )\n$uri = URI->new( $str, $scheme )\nConstructs a new URI object.  The string representation of a URI is given as argument,\ntogether with an optional scheme specification.  Common URI wrappers like \"\" and <>, as\nwell as leading and trailing white space, are automatically removed from the $str\nargument before it is processed further.\n\nThe constructor determines the scheme, maps this to an appropriate URI subclass,\nconstructs a new object of that class and returns it.\n\nIf the scheme isn't one of those that URI recognizes, you still get an URI object back\nthat you can access the generic methods on.  The \"$uri->hasrecognizedscheme\" method can\nbe used to test for this.\n\nThe $scheme argument is only used when $str is a relative URI.  It can be either a simple\nstring that denotes the scheme, a string containing an absolute URI reference, or an\nabsolute \"URI\" object.  If no $scheme is specified for a relative URI $str, then $str is\nsimply treated as a generic URI (no scheme-specific methods available).\n\nThe set of characters available for building URI references is restricted (see\nURI::Escape).  Characters outside this set are automatically escaped by the URI\nconstructor.\n\n$uri = URI->newabs( $str, $baseuri )\nConstructs a new absolute URI object.  The $str argument can denote a relative or\nabsolute URI.  If relative, then it is absolutized using $baseuri as base. The $baseuri\nmust be an absolute URI.\n\n$uri = URI::file->new( $filename )\n$uri = URI::file->new( $filename, $os )\nConstructs a new file URI from a file name.  See URI::file.\n\n$uri = URI::file->newabs( $filename )\n$uri = URI::file->newabs( $filename, $os )\nConstructs a new absolute file URI from a file name.  See URI::file.\n\n$uri = URI::file->cwd\nReturns the current working directory as a file URI.  See URI::file.\n\n$uri->clone\nReturns a copy of the $uri.\n",
            "subsections": []
        },
        "COMMON METHODS": {
            "content": "The methods described in this section are available for all \"URI\" objects.\n\nMethods that give access to components of a URI always return the old value of the component.\nThe value returned is \"undef\" if the component was not present.  There is generally a\ndifference between a component that is empty (represented as \"\") and a component that is\nmissing (represented as \"undef\").  If an accessor method is given an argument, it updates the\ncorresponding component in addition to returning the old value of the component.  Passing an\nundefined argument removes the component (if possible).  The description of each accessor\nmethod indicates whether the component is passed as an escaped (percent-encoded) or an\nunescaped string.  A component that can be further divided into sub-parts are usually passed\nescaped, as unescaping might change its semantics.\n\nThe common methods available for all URI are:\n\n$uri->scheme\n$uri->scheme( $newscheme )\nSets and returns the scheme part of the $uri.  If the $uri is relative, then $uri->scheme\nreturns \"undef\".  If called with an argument, it updates the scheme of $uri, possibly\nchanging the class of $uri, and returns the old scheme value.  The method croaks if the\nnew scheme name is illegal; a scheme name must begin with a letter and must consist of\nonly US-ASCII letters, numbers, and a few special marks: \".\", \"+\", \"-\".  This restriction\neffectively means that the scheme must be passed unescaped.  Passing an undefined\nargument to the scheme method makes the URI relative (if possible).\n\nLetter case does not matter for scheme names.  The string returned by $uri->scheme is\nalways lowercase.  If you want the scheme just as it was written in the URI in its\noriginal case, you can use the $uri->scheme method instead.\n\n$uri->hasrecognizedscheme\nReturns TRUE if the URI scheme is one that URI recognizes.\n\nIt will also be TRUE for relative URLs where a recognized scheme was provided to the\nconstructor, even if \"$uri->scheme\" returns \"undef\" for these.\n\n$uri->opaque\n$uri->opaque( $newopaque )\nSets and returns the scheme-specific part of the $uri (everything between the scheme and\nthe fragment) as an escaped string.\n\n$uri->path\n$uri->path( $newpath )\nSets and returns the same value as $uri->opaque unless the URI supports the generic\nsyntax for hierarchical namespaces.  In that case the generic method is overridden to set\nand return the part of the URI between the host name and the fragment.\n\n$uri->fragment\n$uri->fragment( $newfrag )\nReturns the fragment identifier of a URI reference as an escaped string.\n\n$uri->asstring\nReturns a URI object to a plain ASCII string.  URI objects are also converted to plain\nstrings automatically by overloading.  This means that $uri objects can be used as plain\nstrings in most Perl constructs.\n\n$uri->asiri\nReturns a Unicode string representing the URI.  Escaped UTF-8 sequences representing non-\nASCII characters are turned into their corresponding Unicode code point.\n\n$uri->canonical\nReturns a normalized version of the URI.  The rules for normalization are scheme-\ndependent.  They usually involve lowercasing the scheme and Internet host name\ncomponents, removing the explicit port specification if it matches the default port,\nuppercasing all escape sequences, and unescaping octets that can be better represented as\nplain characters.\n\nFor efficiency reasons, if the $uri is already in normalized form, then a reference to it\nis returned instead of a copy.\n\n$uri->eq( $otheruri )\nURI::eq( $firsturi, $otheruri )\nTests whether two URI references are equal.  URI references that normalize to the same\nstring are considered equal.  The method can also be used as a plain function which can\nalso test two string arguments.\n\nIf you need to test whether two \"URI\" object references denote the same object, use the\n'==' operator.\n\n$uri->abs( $baseuri )\nReturns an absolute URI reference.  If $uri is already absolute, then a reference to it\nis simply returned.  If the $uri is relative, then a new absolute URI is constructed by\ncombining the $uri and the $baseuri, and returned.\n\n$uri->rel( $baseuri )\nReturns a relative URI reference if it is possible to make one that denotes the same\nresource relative to $baseuri.  If not, then $uri is simply returned.\n\n$uri->secure\nReturns a TRUE value if the URI is considered to point to a resource on a secure channel,\nsuch as an SSL or TLS encrypted one.\n",
            "subsections": []
        },
        "GENERIC METHODS": {
            "content": "The following methods are available to schemes that use the common/generic syntax for\nhierarchical namespaces.  The descriptions of schemes below indicate which these are.\nUnrecognized schemes are assumed to support the generic syntax, and therefore the following\nmethods:\n\n$uri->authority\n$uri->authority( $newauthority )\nSets and returns the escaped authority component of the $uri.\n\n$uri->path\n$uri->path( $newpath )\nSets and returns the escaped path component of the $uri (the part between the host name\nand the query or fragment).  The path can never be undefined, but it can be the empty\nstring.\n\n$uri->pathquery\n$uri->pathquery( $newpathquery )\nSets and returns the escaped path and query components as a single entity.  The path and\nthe query are separated by a \"?\" character, but the query can itself contain \"?\".\n\n$uri->pathsegments\n$uri->pathsegments( $segment, ... )\nSets and returns the path.  In a scalar context, it returns the same value as $uri->path.\nIn a list context, it returns the unescaped path segments that make up the path.  Path\nsegments that have parameters are returned as an anonymous array.  The first element is\nthe unescaped path segment proper;  subsequent elements are escaped parameter strings.\nSuch an anonymous array uses overloading so it can be treated as a string too, but this\nstring does not include the parameters.\n\nNote that absolute paths have the empty string as their first pathsegment, i.e. the path\n\"/foo/bar\" have 3 pathsegments; \"\", \"foo\" and \"bar\".\n\n$uri->query\n$uri->query( $newquery )\nSets and returns the escaped query component of the $uri.\n\n$uri->queryform\n$uri->queryform( $key1 => $val1, $key2 => $val2, ... )\n$uri->queryform( $key1 => $val1, $key2 => $val2, ..., $delim )\n$uri->queryform( \\@keyvaluepairs )\n$uri->queryform( \\@keyvaluepairs, $delim )\n$uri->queryform( \\%hash )\n$uri->queryform( \\%hash, $delim )\nSets and returns query components that use the application/x-www-form-urlencoded format.\nKey/value pairs are separated by \"&\", and the key is separated from the value by a \"=\"\ncharacter.\n\nThe form can be set either by passing separate key/value pairs, or via an array or hash\nreference.  Passing an empty array or an empty hash removes the query component, whereas\npassing no arguments at all leaves the component unchanged.  The order of keys is\nundefined if a hash reference is passed.  The old value is always returned as a list of\nseparate key/value pairs.  Assigning this list to a hash is unwise as the keys returned\nmight repeat.\n\nThe values passed when setting the form can be plain strings or references to arrays of\nstrings.  Passing an array of values has the same effect as passing the key repeatedly\nwith one value at a time.  All the following statements have the same effect:\n\n$uri->queryform(foo => 1, foo => 2);\n$uri->queryform(foo => [1, 2]);\n$uri->queryform([ foo => 1, foo => 2 ]);\n$uri->queryform([ foo => [1, 2] ]);\n$uri->queryform({ foo => [1, 2] });\n\nThe $delim parameter can be passed as \";\" to force the key/value pairs to be delimited by\n\";\" instead of \"&\" in the query string.  This practice is often recommended for URLs\nembedded in HTML or XML documents as this avoids the trouble of escaping the \"&\"\ncharacter.  You might also set the $URI::DEFAULTQUERYFORMDELIMITER variable to \";\" for\nthe same global effect.\n\nThe \"URI::QueryParam\" module can be loaded to add further methods to manipulate the form\nof a URI.  See URI::QueryParam for details.\n\n$uri->querykeywords\n$uri->querykeywords( $keywords, ... )\n$uri->querykeywords( \\@keywords )\nSets and returns query components that use the keywords separated by \"+\" format.\n\nThe keywords can be set either by passing separate keywords directly or by passing a\nreference to an array of keywords.  Passing an empty array removes the query component,\nwhereas passing no arguments at all leaves the component unchanged.  The old value is\nalways returned as a list of separate words.\n",
            "subsections": []
        },
        "SERVER METHODS": {
            "content": "For schemes where the authority component denotes an Internet host, the following methods are\navailable in addition to the generic methods.\n\n$uri->userinfo\n$uri->userinfo( $newuserinfo )\nSets and returns the escaped userinfo part of the authority component.\n\nFor some schemes this is a user name and a password separated by a colon.  This practice\nis not recommended. Embedding passwords in clear text (such as URI) has proven to be a\nsecurity risk in almost every case where it has been used.\n\n$uri->host\n$uri->host( $newhost )\nSets and returns the unescaped hostname.\n\nIf the $newhost string ends with a colon and a number, then this number also sets the\nport.\n\nFor IPv6 addresses the brackets around the raw address is removed in the return value\nfrom $uri->host.  When setting the host attribute to an IPv6 address you can use a raw\naddress or one enclosed in brackets.  The address needs to be enclosed in brackets if you\nwant to pass in a new port value as well.\n\n$uri->ihost\nReturns the host in Unicode form.  Any IDNA A-labels are turned into U-labels.\n\n$uri->port\n$uri->port( $newport )\nSets and returns the port.  The port is a simple integer that should be greater than 0.\n\nIf a port is not specified explicitly in the URI, then the URI scheme's default port is\nreturned. If you don't want the default port substituted, then you can use the\n$uri->port method instead.\n\n$uri->hostport\n$uri->hostport( $newhostport )\nSets and returns the host and port as a single unit.  The returned value includes a port,\neven if it matches the default port.  The host part and the port part are separated by a\ncolon: \":\".\n\nFor IPv6 addresses the bracketing is preserved; thus URI->new(\"http://[::1]/\")->hostport\nreturns \"[::1]:80\".  Contrast this with $uri->host which will remove the brackets.\n\n$uri->defaultport\nReturns the default port of the URI scheme to which $uri belongs.  For http this is the\nnumber 80, for ftp this is the number 21, etc.  The default port for a scheme can not be\nchanged.\n",
            "subsections": []
        },
        "SCHEME-SPECIFIC SUPPORT": {
            "content": "Scheme-specific support is provided for the following URI schemes.  For \"URI\" objects that do\nnot belong to one of these, you can only use the common and generic methods.\n\ndata:\nThe data URI scheme is specified in RFC 2397.  It allows inclusion of small data items as\n\"immediate\" data, as if it had been included externally.\n\n\"URI\" objects belonging to the data scheme support the common methods and two new methods\nto access their scheme-specific components: $uri->mediatype and $uri->data.  See\nURI::data for details.\n\nfile:\nAn old specification of the file URI scheme is found in RFC 1738.  A new RFC 2396 based\nspecification in not available yet, but file URI references are in common use.\n\n\"URI\" objects belonging to the file scheme support the common and generic methods.  In\naddition, they provide two methods for mapping file URIs back to local file names;\n$uri->file and $uri->dir.  See URI::file for details.\n\nftp:\nAn old specification of the ftp URI scheme is found in RFC 1738.  A new RFC 2396 based\nspecification in not available yet, but ftp URI references are in common use.\n\n\"URI\" objects belonging to the ftp scheme support the common, generic and server methods.\nIn addition, they provide two methods for accessing the userinfo sub-components:\n$uri->user and $uri->password.\n\ngopher:\nThe gopher URI scheme is specified in <draft-murali-url-gopher-1996-12-04> and will\nhopefully be available as a RFC 2396 based specification.\n\n\"URI\" objects belonging to the gopher scheme support the common, generic and server\nmethods. In addition, they support some methods for accessing gopher-specific path\ncomponents: $uri->gophertype, $uri->selector, $uri->search, $uri->string.\n\nhttp:\nThe http URI scheme is specified in RFC 2616.  The scheme is used to reference resources\nhosted by HTTP servers.\n\n\"URI\" objects belonging to the http scheme support the common, generic and server\nmethods.\n\nhttps:\nThe https URI scheme is a Netscape invention which is commonly implemented.  The scheme\nis used to reference HTTP servers through SSL connections.  Its syntax is the same as\nhttp, but the default port is different.\n\nldap:\nThe ldap URI scheme is specified in RFC 2255.  LDAP is the Lightweight Directory Access\nProtocol.  An ldap URI describes an LDAP search operation to perform to retrieve\ninformation from an LDAP directory.\n\n\"URI\" objects belonging to the ldap scheme support the common, generic and server methods\nas well as ldap-specific methods: $uri->dn, $uri->attributes, $uri->scope, $uri->filter,\n$uri->extensions.  See URI::ldap for details.\n\nldapi:\nLike the ldap URI scheme, but uses a UNIX domain socket.  The server methods are not\nsupported, and the local socket path is available as $uri->unpath.  The ldapi scheme is\nused by the OpenLDAP package.  There is no real specification for it, but it is mentioned\nin various OpenLDAP manual pages.\n\nldaps:\nLike the ldap URI scheme, but uses an SSL connection.  This scheme is deprecated, as the\npreferred way is to use the starttls mechanism.\n\nmailto:\nThe mailto URI scheme is specified in RFC 2368.  The scheme was originally used to\ndesignate the Internet mailing address of an individual or service.  It has (in RFC 2368)\nbeen extended to allow setting of other mail header fields and the message body.\n\n\"URI\" objects belonging to the mailto scheme support the common methods and the generic\nquery methods.  In addition, they support the following mailto-specific methods:\n$uri->to, $uri->headers.\n\nNote that the \"foo@example.com\" part of a mailto is not the \"userinfo\" and \"host\" but\ninstead the \"path\".  This allows a mailto URI to contain multiple comma separated email\naddresses.\n\nmms:\nThe mms URL specification can be found at <http://sdp.ppona.com/>.  \"URI\" objects\nbelonging to the mms scheme support the common, generic, and server methods, with the\nexception of userinfo and query-related sub-components.\n\nnews:\nThe news, nntp and snews URI schemes are specified in <draft-gilman-news-url-01> and will\nhopefully be available as an RFC 2396 based specification soon. (Update: as of April\n2010, they are in RFC 5538 <https://tools.ietf.org/html/rfc5538>.\n\n\"URI\" objects belonging to the news scheme support the common, generic and server\nmethods.  In addition, they provide some methods to access the path: $uri->group and\n$uri->message.\n\nnntp:\nSee news scheme.\n\nnntps:\nSee news scheme and RFC 5538 <https://tools.ietf.org/html/rfc5538>.\n\npop:\nThe pop URI scheme is specified in RFC 2384. The scheme is used to reference a POP3\nmailbox.\n\n\"URI\" objects belonging to the pop scheme support the common, generic and server methods.\nIn addition, they provide two methods to access the userinfo components: $uri->user and\n$uri->auth\n\nrlogin:\nAn old specification of the rlogin URI scheme is found in RFC 1738. \"URI\" objects\nbelonging to the rlogin scheme support the common, generic and server methods.\n\nrtsp:\nThe rtsp URL specification can be found in section 3.2 of RFC 2326.  \"URI\" objects\nbelonging to the rtsp scheme support the common, generic, and server methods, with the\nexception of userinfo and query-related sub-components.\n\nrtspu:\nThe rtspu URI scheme is used to talk to RTSP servers over UDP instead of TCP.  The syntax\nis the same as rtsp.\n\nrsync:\nInformation about rsync is available from <http://rsync.samba.org/>.  \"URI\" objects\nbelonging to the rsync scheme support the common, generic and server methods.  In\naddition, they provide methods to access the userinfo sub-components: $uri->user and\n$uri->password.\n\nsip:\nThe sip URI specification is described in sections 19.1 and 25 of RFC 3261.  \"URI\"\nobjects belonging to the sip scheme support the common, generic, and server methods with\nthe exception of path related sub-components.  In addition, they provide two methods to\nget and set sip parameters: $uri->paramsform and $uri->params.\n\nsips:\nSee sip scheme.  Its syntax is the same as sip, but the default port is different.\n\nsnews:\nSee news scheme.  Its syntax is the same as news, but the default port is different.\n\ntelnet:\nAn old specification of the telnet URI scheme is found in RFC 1738. \"URI\" objects\nbelonging to the telnet scheme support the common, generic and server methods.\n\ntn3270:\nThese URIs are used like telnet URIs but for connections to IBM mainframes.  \"URI\"\nobjects belonging to the tn3270 scheme support the common, generic and server methods.\n\nssh:\nInformation about ssh is available at <http://www.openssh.com/>.  \"URI\" objects belonging\nto the ssh scheme support the common, generic and server methods. In addition, they\nprovide methods to access the userinfo sub-components: $uri->user and $uri->password.\n\nsftp:\n\"URI\" objects belonging to the sftp scheme support the common, generic and server\nmethods. In addition, they provide methods to access the userinfo sub-components:\n$uri->user and $uri->password.\n\nurn:\nThe syntax of Uniform Resource Names is specified in RFC 2141.  \"URI\" objects belonging\nto the urn scheme provide the common methods, and also the methods $uri->nid and\n$uri->nss, which return the Namespace Identifier and the Namespace-Specific String\nrespectively.\n\nThe Namespace Identifier basically works like the Scheme identifier of URIs, and further\ndivides the URN namespace.  Namespace Identifier assignments are maintained at\n<http://www.iana.org/assignments/urn-namespaces>.\n\nLetter case is not significant for the Namespace Identifier.  It is always returned in\nlower case by the $uri->nid method.  The $uri->nid method can be used if you want it in\nits original case.\n\nurn:isbn:\nThe \"urn:isbn:\" namespace contains International Standard Book Numbers (ISBNs) and is\ndescribed in RFC 3187.  A \"URI\" object belonging to this namespace has the following\nextra methods (if the Business::ISBN module is available): $uri->isbn,\n$uri->isbnpublishercode, $uri->isbngroupcode (formerly isbncountrycode, which is\nstill supported by issues a deprecation warning), $uri->isbnasean.\n\nurn:oid:\nThe \"urn:oid:\" namespace contains Object Identifiers (OIDs) and is described in RFC 3061.\nAn object identifier consists of sequences of digits separated by dots.  A \"URI\" object\nbelonging to this namespace has an additional method called $uri->oid that can be used to\nget/set the oid value.  In a list context, oid numbers are returned as separate elements.\n",
            "subsections": []
        },
        "CONFIGURATION VARIABLES": {
            "content": "The following configuration variables influence how the class and its methods behave:\n\n$URI::ABSALLOWRELATIVESCHEME\nSome older parsers used to allow the scheme name to be present in the relative URL if it\nwas the same as the base URL scheme.  RFC 2396 says that this should be avoided, but you\ncan enable this old behaviour by setting the $URI::ABSALLOWRELATIVESCHEME variable to\na TRUE value.  The difference is demonstrated by the following examples:\n\nURI->new(\"http:foo\")->abs(\"http://host/a/b\")\n==>  \"http:foo\"\n\nlocal $URI::ABSALLOWRELATIVESCHEME = 1;\nURI->new(\"http:foo\")->abs(\"http://host/a/b\")\n==>  \"http:/host/a/foo\"\n\n$URI::ABSREMOTELEADINGDOTS\nYou can also have the abs() method ignore excess \"..\"  segments in the relative URI by\nsetting $URI::ABSREMOTELEADINGDOTS to a TRUE value.  The difference is demonstrated by\nthe following examples:\n\nURI->new(\"../../../foo\")->abs(\"http://host/a/b\")\n==> \"http://host/../../foo\"\n\nlocal $URI::ABSREMOTELEADINGDOTS = 1;\nURI->new(\"../../../foo\")->abs(\"http://host/a/b\")\n==> \"http://host/foo\"\n\n$URI::DEFAULTQUERYFORMDELIMITER\nThis value can be set to \";\" to have the query form \"key=value\" pairs delimited by \";\"\ninstead of \"&\" which is the default.\n",
            "subsections": []
        },
        "BUGS": {
            "content": "There are some things that are not quite right:\n\n•   Using regexp variables like $1 directly as arguments to the URI accessor methods does not\nwork too well with current perl implementations.  I would argue that this is actually a\nbug in perl.  The workaround is to quote them. Example:\n\n/(...)/ || die;\n$u->query(\"$1\");\n\n•   The escaping (percent encoding) of chars in the 128 .. 255 range passed to the URI\nconstructor or when setting URI parts using the accessor methods depend on the state of\nthe internal UTF8 flag (see utf8::isutf8) of the string passed.  If the UTF8 flag is set\nthe UTF-8 encoded version of the character is percent encoded.  If the UTF8 flag isn't\nset the Latin-1 version (byte) of the character is percent encoded.  This basically\nexposes the internal encoding of Perl strings.\n",
            "subsections": [
                {
                    "name": "PARSING URIs WITH REGEXP",
                    "content": "As an alternative to this module, the following (official) regular expression can be used to\ndecode a URI:\n\nmy($scheme, $authority, $path, $query, $fragment) =\n$uri =~ m|(?:([^:/?#]+):)?(?://([^/?#]*))?([^?#]*)(?:\\?([^#]*))?(?:#(.*))?|;\n\nThe \"URI::Split\" module provides the function urisplit() as a readable alternative.\n"
                }
            ]
        },
        "SEE ALSO": {
            "content": "URI::file, URI::WithBase, URI::QueryParam, URI::Escape, URI::Split, URI::Heuristic\n\nRFC 2396: \"Uniform Resource Identifiers (URI): Generic Syntax\", Berners-Lee, Fielding,\nMasinter, August 1998.\n\n<http://www.iana.org/assignments/uri-schemes>\n\n<http://www.iana.org/assignments/urn-namespaces>\n\n<http://www.w3.org/Addressing/>\n",
            "subsections": []
        },
        "COPYRIGHT": {
            "content": "Copyright 1995-2009 Gisle Aas.\n\nCopyright 1995 Martijn Koster.\n\nThis program is free software; you can redistribute it and/or modify it under the same terms\nas Perl itself.\n",
            "subsections": []
        },
        "AUTHORS / ACKNOWLEDGMENTS": {
            "content": "This module is based on the \"URI::URL\" module, which in turn was (distantly) based on the\n\"wwwurl.pl\" code in the libwww-perl for perl4 developed by Roy Fielding, as part of the\nArcadia project at the University of California, Irvine, with contributions from Brooks\nCutter.\n\n\"URI::URL\" was developed by Gisle Aas, Tim Bunce, Roy Fielding and Martijn Koster with input\nfrom other people on the libwww-perl mailing list.\n\n\"URI\" and related subclasses was developed by Gisle Aas.\n\n\n\nperl v5.32.1                                 2021-10-26                                     URI(3pm)",
            "subsections": []
        }
    },
    "summary": "URI - Uniform Resource Identifiers (absolute and relative)",
    "flags": [],
    "examples": [],
    "see_also": []
}