1URI(3)                User Contributed Perl Documentation               URI(3)
2
3
4

NAME

6       URI - Uniform Resource Identifiers (absolute and relative)
7

SYNOPSIS

9        use URI;
10
11        $u1 = URI->new("http://www.perl.com");
12        $u2 = URI->new("foo", "http");
13        $u3 = $u2->abs($u1);
14        $u4 = $u3->clone;
15        $u5 = URI->new("HTTP://WWW.perl.com:80")->canonical;
16
17        $str = $u->as_string;
18        $str = "$u";
19
20        $scheme = $u->scheme;
21        $opaque = $u->opaque;
22        $path   = $u->path;
23        $frag   = $u->fragment;
24
25        $u->scheme("ftp");
26        $u->host("ftp.perl.com");
27        $u->path("cpan/");
28

DESCRIPTION

30       This module implements the "URI" class.  Objects of this class
31       represent "Uniform Resource Identifier references" as specified in RFC
32       2396 (and updated by RFC 2732).
33
34       A Uniform Resource Identifier is a compact string of characters that
35       identifies an abstract or physical resource.  A Uniform Resource
36       Identifier can be further classified as either a Uniform Resource
37       Locator (URL) or a Uniform Resource Name (URN).  The distinction
38       between URL and URN does not matter to the "URI" class interface. A
39       "URI-reference" is a URI that may have additional information attached
40       in the form of a fragment identifier.
41
42       An absolute URI reference consists of three parts:  a scheme, a scheme-
43       specific part and a fragment identifier.  A subset of URI references
44       share a common syntax for hierarchical namespaces.  For these, the
45       scheme-specific part is further broken down into authority, path and
46       query components.  These URIs can also take the form of relative URI
47       references, where the scheme (and usually also the authority) component
48       is missing, but implied by the context of the URI reference.  The three
49       forms of URI reference syntax are summarized as follows:
50
51         <scheme>:<scheme-specific-part>#<fragment>
52         <scheme>://<authority><path>?<query>#<fragment>
53         <path>?<query>#<fragment>
54
55       The components into which a URI reference can be divided depend on the
56       scheme.  The "URI" class provides methods to get and set the individual
57       components.  The methods available for a specific "URI" object depend
58       on the scheme.
59

CONSTRUCTORS

61       The following methods construct new "URI" objects:
62
63       $uri = URI->new( $str )
64       $uri = URI->new( $str, $scheme )
65           Constructs a new URI object.  The string representation of a URI is
66           given as argument, together with an optional scheme specification.
67           Common URI wrappers like "" and <>, as well as leading and trailing
68           white space, are automatically removed from the $str argument
69           before it is processed further.
70
71           The constructor determines the scheme, maps this to an appropriate
72           URI subclass, constructs a new object of that class and returns it.
73
74           If the scheme isn't one of those that URI recognizes, you still get
75           an URI object back that you can access the generic methods on.  The
76           "$uri->has_recognized_scheme" method can be used to test for this.
77
78           The $scheme argument is only used when $str is a relative URI.  It
79           can be either a simple string that denotes the scheme, a string
80           containing an absolute URI reference, or an absolute "URI" object.
81           If no $scheme is specified for a relative URI $str, then $str is
82           simply treated as a generic URI (no scheme-specific methods
83           available).
84
85           The set of characters available for building URI references is
86           restricted (see URI::Escape).  Characters outside this set are
87           automatically escaped by the URI constructor.
88
89       $uri = URI->new_abs( $str, $base_uri )
90           Constructs a new absolute URI object.  The $str argument can denote
91           a relative or absolute URI.  If relative, then it is absolutized
92           using $base_uri as base. The $base_uri must be an absolute URI.
93
94       $uri = URI::file->new( $filename )
95       $uri = URI::file->new( $filename, $os )
96           Constructs a new file URI from a file name.  See URI::file.
97
98       $uri = URI::file->new_abs( $filename )
99       $uri = URI::file->new_abs( $filename, $os )
100           Constructs a new absolute file URI from a file name.  See
101           URI::file.
102
103       $uri = URI::file->cwd
104           Returns the current working directory as a file URI.  See
105           URI::file.
106
107       $uri->clone
108           Returns a copy of the $uri.
109

COMMON METHODS

111       The methods described in this section are available for all "URI"
112       objects.
113
114       Methods that give access to components of a URI always return the old
115       value of the component.  The value returned is "undef" if the component
116       was not present.  There is generally a difference between a component
117       that is empty (represented as "") and a component that is missing
118       (represented as "undef").  If an accessor method is given an argument,
119       it updates the corresponding component in addition to returning the old
120       value of the component.  Passing an undefined argument removes the
121       component (if possible).  The description of each accessor method
122       indicates whether the component is passed as an escaped (percent-
123       encoded) or an unescaped string.  A component that can be further
124       divided into sub-parts are usually passed escaped, as unescaping might
125       change its semantics.
126
127       The common methods available for all URI are:
128
129       $uri->scheme
130       $uri->scheme( $new_scheme )
131           Sets and returns the scheme part of the $uri.  If the $uri is
132           relative, then $uri->scheme returns "undef".  If called with an
133           argument, it updates the scheme of $uri, possibly changing the
134           class of $uri, and returns the old scheme value.  The method croaks
135           if the new scheme name is illegal; a scheme name must begin with a
136           letter and must consist of only US-ASCII letters, numbers, and a
137           few special marks: ".", "+", "-".  This restriction effectively
138           means that the scheme must be passed unescaped.  Passing an
139           undefined argument to the scheme method makes the URI relative (if
140           possible).
141
142           Letter case does not matter for scheme names.  The string returned
143           by $uri->scheme is always lowercase.  If you want the scheme just
144           as it was written in the URI in its original case, you can use the
145           $uri->_scheme method instead.
146
147       $uri->has_recognized_scheme
148           Returns TRUE if the URI scheme is one that URI recognizes.
149
150           It will also be TRUE for relative URLs where a recognized scheme
151           was provided to the constructor, even if "$uri->scheme" returns
152           "undef" for these.
153
154       $uri->opaque
155       $uri->opaque( $new_opaque )
156           Sets and returns the scheme-specific part of the $uri (everything
157           between the scheme and the fragment) as an escaped string.
158
159       $uri->path
160       $uri->path( $new_path )
161           Sets and returns the same value as $uri->opaque unless the URI
162           supports the generic syntax for hierarchical namespaces.  In that
163           case the generic method is overridden to set and return the part of
164           the URI between the host name and the fragment.
165
166       $uri->fragment
167       $uri->fragment( $new_frag )
168           Returns the fragment identifier of a URI reference as an escaped
169           string.
170
171       $uri->as_string
172           Returns a URI object to a plain ASCII string.  URI objects are also
173           converted to plain strings automatically by overloading.  This
174           means that $uri objects can be used as plain strings in most Perl
175           constructs.
176
177       $uri->as_iri
178           Returns a Unicode string representing the URI.  Escaped UTF-8
179           sequences representing non-ASCII characters are turned into their
180           corresponding Unicode code point.
181
182       $uri->canonical
183           Returns a normalized version of the URI.  The rules for
184           normalization are scheme-dependent.  They usually involve
185           lowercasing the scheme and Internet host name components, removing
186           the explicit port specification if it matches the default port,
187           uppercasing all escape sequences, and unescaping octets that can be
188           better represented as plain characters.
189
190           For efficiency reasons, if the $uri is already in normalized form,
191           then a reference to it is returned instead of a copy.
192
193       $uri->eq( $other_uri )
194       URI::eq( $first_uri, $other_uri )
195           Tests whether two URI references are equal.  URI references that
196           normalize to the same string are considered equal.  The method can
197           also be used as a plain function which can also test two string
198           arguments.
199
200           If you need to test whether two "URI" object references denote the
201           same object, use the '==' operator.
202
203       $uri->abs( $base_uri )
204           Returns an absolute URI reference.  If $uri is already absolute,
205           then a reference to it is simply returned.  If the $uri is
206           relative, then a new absolute URI is constructed by combining the
207           $uri and the $base_uri, and returned.
208
209       $uri->rel( $base_uri )
210           Returns a relative URI reference if it is possible to make one that
211           denotes the same resource relative to $base_uri.  If not, then $uri
212           is simply returned.
213
214       $uri->secure
215           Returns a TRUE value if the URI is considered to point to a
216           resource on a secure channel, such as an SSL or TLS encrypted one.
217

GENERIC METHODS

219       The following methods are available to schemes that use the
220       common/generic syntax for hierarchical namespaces.  The descriptions of
221       schemes below indicate which these are.  Unrecognized schemes are
222       assumed to support the generic syntax, and therefore the following
223       methods:
224
225       $uri->authority
226       $uri->authority( $new_authority )
227           Sets and returns the escaped authority component of the $uri.
228
229       $uri->path
230       $uri->path( $new_path )
231           Sets and returns the escaped path component of the $uri (the part
232           between the host name and the query or fragment).  The path can
233           never be undefined, but it can be the empty string.
234
235       $uri->path_query
236       $uri->path_query( $new_path_query )
237           Sets and returns the escaped path and query components as a single
238           entity.  The path and the query are separated by a "?" character,
239           but the query can itself contain "?".
240
241       $uri->path_segments
242       $uri->path_segments( $segment, ... )
243           Sets and returns the path.  In a scalar context, it returns the
244           same value as $uri->path.  In a list context, it returns the
245           unescaped path segments that make up the path.  Path segments that
246           have parameters are returned as an anonymous array.  The first
247           element is the unescaped path segment proper;  subsequent elements
248           are escaped parameter strings.  Such an anonymous array uses
249           overloading so it can be treated as a string too, but this string
250           does not include the parameters.
251
252           Note that absolute paths have the empty string as their first
253           path_segment, i.e. the path "/foo/bar" have 3 path_segments; "",
254           "foo" and "bar".
255
256       $uri->query
257       $uri->query( $new_query )
258           Sets and returns the escaped query component of the $uri.
259
260       $uri->query_form
261       $uri->query_form( $key1 => $val1, $key2 => $val2, ... )
262       $uri->query_form( $key1 => $val1, $key2 => $val2, ..., $delim )
263       $uri->query_form( \@key_value_pairs )
264       $uri->query_form( \@key_value_pairs, $delim )
265       $uri->query_form( \%hash )
266       $uri->query_form( \%hash, $delim )
267           Sets and returns query components that use the
268           application/x-www-form-urlencoded format.  Key/value pairs are
269           separated by "&", and the key is separated from the value by a "="
270           character.
271
272           The form can be set either by passing separate key/value pairs, or
273           via an array or hash reference.  Passing an empty array or an empty
274           hash removes the query component, whereas passing no arguments at
275           all leaves the component unchanged.  The order of keys is undefined
276           if a hash reference is passed.  The old value is always returned as
277           a list of separate key/value pairs.  Assigning this list to a hash
278           is unwise as the keys returned might repeat.
279
280           The values passed when setting the form can be plain strings or
281           references to arrays of strings.  Passing an array of values has
282           the same effect as passing the key repeatedly with one value at a
283           time.  All the following statements have the same effect:
284
285               $uri->query_form(foo => 1, foo => 2);
286               $uri->query_form(foo => [1, 2]);
287               $uri->query_form([ foo => 1, foo => 2 ]);
288               $uri->query_form([ foo => [1, 2] ]);
289               $uri->query_form({ foo => [1, 2] });
290
291           The $delim parameter can be passed as ";" to force the key/value
292           pairs to be delimited by ";" instead of "&" in the query string.
293           This practice is often recommended for URLs embedded in HTML or XML
294           documents as this avoids the trouble of escaping the "&" character.
295           You might also set the $URI::DEFAULT_QUERY_FORM_DELIMITER variable
296           to ";" for the same global effect.
297
298           The "URI::QueryParam" module can be loaded to add further methods
299           to manipulate the form of a URI.  See URI::QueryParam for details.
300
301       $uri->query_keywords
302       $uri->query_keywords( $keywords, ... )
303       $uri->query_keywords( \@keywords )
304           Sets and returns query components that use the keywords separated
305           by "+" format.
306
307           The keywords can be set either by passing separate keywords
308           directly or by passing a reference to an array of keywords.
309           Passing an empty array removes the query component, whereas passing
310           no arguments at all leaves the component unchanged.  The old value
311           is always returned as a list of separate words.
312

SERVER METHODS

314       For schemes where the authority component denotes an Internet host, the
315       following methods are available in addition to the generic methods.
316
317       $uri->userinfo
318       $uri->userinfo( $new_userinfo )
319           Sets and returns the escaped userinfo part of the authority
320           component.
321
322           For some schemes this is a user name and a password separated by a
323           colon.  This practice is not recommended. Embedding passwords in
324           clear text (such as URI) has proven to be a security risk in almost
325           every case where it has been used.
326
327       $uri->host
328       $uri->host( $new_host )
329           Sets and returns the unescaped hostname.
330
331           If the $new_host string ends with a colon and a number, then this
332           number also sets the port.
333
334           For IPv6 addresses the brackets around the raw address is removed
335           in the return value from $uri->host.  When setting the host
336           attribute to an IPv6 address you can use a raw address or one
337           enclosed in brackets.  The address needs to be enclosed in brackets
338           if you want to pass in a new port value as well.
339
340       $uri->ihost
341           Returns the host in Unicode form.  Any IDNA A-labels are turned
342           into U-labels.
343
344       $uri->port
345       $uri->port( $new_port )
346           Sets and returns the port.  The port is a simple integer that
347           should be greater than 0.
348
349           If a port is not specified explicitly in the URI, then the URI
350           scheme's default port is returned. If you don't want the default
351           port substituted, then you can use the $uri->_port method instead.
352
353       $uri->host_port
354       $uri->host_port( $new_host_port )
355           Sets and returns the host and port as a single unit.  The returned
356           value includes a port, even if it matches the default port.  The
357           host part and the port part are separated by a colon: ":".
358
359           For IPv6 addresses the bracketing is preserved; thus
360           URI->new("http://[::1]/")->host_port returns "[::1]:80".  Contrast
361           this with $uri->host which will remove the brackets.
362
363       $uri->default_port
364           Returns the default port of the URI scheme to which $uri belongs.
365           For http this is the number 80, for ftp this is the number 21, etc.
366           The default port for a scheme can not be changed.
367

SCHEME-SPECIFIC SUPPORT

369       Scheme-specific support is provided for the following URI schemes.  For
370       "URI" objects that do not belong to one of these, you can only use the
371       common and generic methods.
372
373       data:
374           The data URI scheme is specified in RFC 2397.  It allows inclusion
375           of small data items as "immediate" data, as if it had been included
376           externally.
377
378           "URI" objects belonging to the data scheme support the common
379           methods and two new methods to access their scheme-specific
380           components: $uri->media_type and $uri->data.  See URI::data for
381           details.
382
383       file:
384           An old specification of the file URI scheme is found in RFC 1738.
385           A new RFC 2396 based specification in not available yet, but file
386           URI references are in common use.
387
388           "URI" objects belonging to the file scheme support the common and
389           generic methods.  In addition, they provide two methods for mapping
390           file URIs back to local file names; $uri->file and $uri->dir.  See
391           URI::file for details.
392
393       ftp:
394           An old specification of the ftp URI scheme is found in RFC 1738.  A
395           new RFC 2396 based specification in not available yet, but ftp URI
396           references are in common use.
397
398           "URI" objects belonging to the ftp scheme support the common,
399           generic and server methods.  In addition, they provide two methods
400           for accessing the userinfo sub-components: $uri->user and
401           $uri->password.
402
403       gopher:
404           The gopher URI scheme is specified in
405           <draft-murali-url-gopher-1996-12-04> and will hopefully be
406           available as a RFC 2396 based specification.
407
408           "URI" objects belonging to the gopher scheme support the common,
409           generic and server methods. In addition, they support some methods
410           for accessing gopher-specific path components: $uri->gopher_type,
411           $uri->selector, $uri->search, $uri->string.
412
413       http:
414           The http URI scheme is specified in RFC 2616.  The scheme is used
415           to reference resources hosted by HTTP servers.
416
417           "URI" objects belonging to the http scheme support the common,
418           generic and server methods.
419
420       https:
421           The https URI scheme is a Netscape invention which is commonly
422           implemented.  The scheme is used to reference HTTP servers through
423           SSL connections.  Its syntax is the same as http, but the default
424           port is different.
425
426       ldap:
427           The ldap URI scheme is specified in RFC 2255.  LDAP is the
428           Lightweight Directory Access Protocol.  An ldap URI describes an
429           LDAP search operation to perform to retrieve information from an
430           LDAP directory.
431
432           "URI" objects belonging to the ldap scheme support the common,
433           generic and server methods as well as ldap-specific methods:
434           $uri->dn, $uri->attributes, $uri->scope, $uri->filter,
435           $uri->extensions.  See URI::ldap for details.
436
437       ldapi:
438           Like the ldap URI scheme, but uses a UNIX domain socket.  The
439           server methods are not supported, and the local socket path is
440           available as $uri->un_path.  The ldapi scheme is used by the
441           OpenLDAP package.  There is no real specification for it, but it is
442           mentioned in various OpenLDAP manual pages.
443
444       ldaps:
445           Like the ldap URI scheme, but uses an SSL connection.  This scheme
446           is deprecated, as the preferred way is to use the start_tls
447           mechanism.
448
449       mailto:
450           The mailto URI scheme is specified in RFC 2368.  The scheme was
451           originally used to designate the Internet mailing address of an
452           individual or service.  It has (in RFC 2368) been extended to allow
453           setting of other mail header fields and the message body.
454
455           "URI" objects belonging to the mailto scheme support the common
456           methods and the generic query methods.  In addition, they support
457           the following mailto-specific methods: $uri->to, $uri->headers.
458
459           Note that the "foo@example.com" part of a mailto is not the
460           "userinfo" and "host" but instead the "path".  This allows a mailto
461           URI to contain multiple comma separated email addresses.
462
463       mms:
464           The mms URL specification can be found at <http://sdp.ppona.com/>.
465           "URI" objects belonging to the mms scheme support the common,
466           generic, and server methods, with the exception of userinfo and
467           query-related sub-components.
468
469       news:
470           The news, nntp and snews URI schemes are specified in
471           <draft-gilman-news-url-01> and will hopefully be available as an
472           RFC 2396 based specification soon.
473
474           "URI" objects belonging to the news scheme support the common,
475           generic and server methods.  In addition, they provide some methods
476           to access the path: $uri->group and $uri->message.
477
478       nntp:
479           See news scheme.
480
481       pop:
482           The pop URI scheme is specified in RFC 2384. The scheme is used to
483           reference a POP3 mailbox.
484
485           "URI" objects belonging to the pop scheme support the common,
486           generic and server methods.  In addition, they provide two methods
487           to access the userinfo components: $uri->user and $uri->auth
488
489       rlogin:
490           An old specification of the rlogin URI scheme is found in RFC 1738.
491           "URI" objects belonging to the rlogin scheme support the common,
492           generic and server methods.
493
494       rtsp:
495           The rtsp URL specification can be found in section 3.2 of RFC 2326.
496           "URI" objects belonging to the rtsp scheme support the common,
497           generic, and server methods, with the exception of userinfo and
498           query-related sub-components.
499
500       rtspu:
501           The rtspu URI scheme is used to talk to RTSP servers over UDP
502           instead of TCP.  The syntax is the same as rtsp.
503
504       rsync:
505           Information about rsync is available from
506           <http://rsync.samba.org/>.  "URI" objects belonging to the rsync
507           scheme support the common, generic and server methods.  In
508           addition, they provide methods to access the userinfo sub-
509           components: $uri->user and $uri->password.
510
511       sip:
512           The sip URI specification is described in sections 19.1 and 25 of
513           RFC 3261.  "URI" objects belonging to the sip scheme support the
514           common, generic, and server methods with the exception of path
515           related sub-components.  In addition, they provide two methods to
516           get and set sip parameters: $uri->params_form and $uri->params.
517
518       sips:
519           See sip scheme.  Its syntax is the same as sip, but the default
520           port is different.
521
522       snews:
523           See news scheme.  Its syntax is the same as news, but the default
524           port is different.
525
526       telnet:
527           An old specification of the telnet URI scheme is found in RFC 1738.
528           "URI" objects belonging to the telnet scheme support the common,
529           generic and server methods.
530
531       tn3270:
532           These URIs are used like telnet URIs but for connections to IBM
533           mainframes.  "URI" objects belonging to the tn3270 scheme support
534           the common, generic and server methods.
535
536       ssh:
537           Information about ssh is available at <http://www.openssh.com/>.
538           "URI" objects belonging to the ssh scheme support the common,
539           generic and server methods. In addition, they provide methods to
540           access the userinfo sub-components: $uri->user and $uri->password.
541
542       sftp:
543           "URI" objects belonging to the sftp scheme support the common,
544           generic and server methods. In addition, they provide methods to
545           access the userinfo sub-components: $uri->user and $uri->password.
546
547       urn:
548           The syntax of Uniform Resource Names is specified in RFC 2141.
549           "URI" objects belonging to the urn scheme provide the common
550           methods, and also the methods $uri->nid and $uri->nss, which return
551           the Namespace Identifier and the Namespace-Specific String
552           respectively.
553
554           The Namespace Identifier basically works like the Scheme identifier
555           of URIs, and further divides the URN namespace.  Namespace
556           Identifier assignments are maintained at
557           <http://www.iana.org/assignments/urn-namespaces>.
558
559           Letter case is not significant for the Namespace Identifier.  It is
560           always returned in lower case by the $uri->nid method.  The
561           $uri->_nid method can be used if you want it in its original case.
562
563       urn:isbn:
564           The "urn:isbn:" namespace contains International Standard Book
565           Numbers (ISBNs) and is described in RFC 3187.  A "URI" object
566           belonging to this namespace has the following extra methods (if the
567           Business::ISBN module is available): $uri->isbn,
568           $uri->isbn_publisher_code, $uri->isbn_group_code (formerly
569           isbn_country_code, which is still supported by issues a deprecation
570           warning), $uri->isbn_as_ean.
571
572       urn:oid:
573           The "urn:oid:" namespace contains Object Identifiers (OIDs) and is
574           described in RFC 3061.  An object identifier consists of sequences
575           of digits separated by dots.  A "URI" object belonging to this
576           namespace has an additional method called $uri->oid that can be
577           used to get/set the oid value.  In a list context, oid numbers are
578           returned as separate elements.
579

CONFIGURATION VARIABLES

581       The following configuration variables influence how the class and its
582       methods behave:
583
584       $URI::ABS_ALLOW_RELATIVE_SCHEME
585           Some older parsers used to allow the scheme name to be present in
586           the relative URL if it was the same as the base URL scheme.  RFC
587           2396 says that this should be avoided, but you can enable this old
588           behaviour by setting the $URI::ABS_ALLOW_RELATIVE_SCHEME variable
589           to a TRUE value.  The difference is demonstrated by the following
590           examples:
591
592             URI->new("http:foo")->abs("http://host/a/b")
593                 ==>  "http:foo"
594
595             local $URI::ABS_ALLOW_RELATIVE_SCHEME = 1;
596             URI->new("http:foo")->abs("http://host/a/b")
597                 ==>  "http:/host/a/foo"
598
599       $URI::ABS_REMOTE_LEADING_DOTS
600           You can also have the abs() method ignore excess ".."  segments in
601           the relative URI by setting $URI::ABS_REMOTE_LEADING_DOTS to a TRUE
602           value.  The difference is demonstrated by the following examples:
603
604             URI->new("../../../foo")->abs("http://host/a/b")
605                 ==> "http://host/../../foo"
606
607             local $URI::ABS_REMOTE_LEADING_DOTS = 1;
608             URI->new("../../../foo")->abs("http://host/a/b")
609                 ==> "http://host/foo"
610
611       $URI::DEFAULT_QUERY_FORM_DELIMITER
612           This value can be set to ";" to have the query form "key=value"
613           pairs delimited by ";" instead of "&" which is the default.
614

BUGS

616       There are some things that are not quite right:
617
618       ·   Using regexp variables like $1 directly as arguments to the URI
619           accessor methods does not work too well with current perl
620           implementations.  I would argue that this is actually a bug in
621           perl.  The workaround is to quote them. Example:
622
623              /(...)/ || die;
624              $u->query("$1");
625
626       ·   The escaping (percent encoding) of chars in the 128 .. 255 range
627           passed to the URI constructor or when setting URI parts using the
628           accessor methods depend on the state of the internal UTF8 flag (see
629           utf8::is_utf8) of the string passed.  If the UTF8 flag is set the
630           UTF-8 encoded version of the character is percent encoded.  If the
631           UTF8 flag isn't set the Latin-1 version (byte) of the character is
632           percent encoded.  This basically exposes the internal encoding of
633           Perl strings.
634

PARSING URIs WITH REGEXP

636       As an alternative to this module, the following (official) regular
637       expression can be used to decode a URI:
638
639         my($scheme, $authority, $path, $query, $fragment) =
640         $uri =~ m|(?:([^:/?#]+):)?(?://([^/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?|;
641
642       The "URI::Split" module provides the function uri_split() as a readable
643       alternative.
644

SEE ALSO

646       URI::file, URI::WithBase, URI::QueryParam, URI::Escape, URI::Split,
647       URI::Heuristic
648
649       RFC 2396: "Uniform Resource Identifiers (URI): Generic Syntax",
650       Berners-Lee, Fielding, Masinter, August 1998.
651
652       <http://www.iana.org/assignments/uri-schemes>
653
654       <http://www.iana.org/assignments/urn-namespaces>
655
656       <http://www.w3.org/Addressing/>
657
659       Copyright 1995-2009 Gisle Aas.
660
661       Copyright 1995 Martijn Koster.
662
663       This program is free software; you can redistribute it and/or modify it
664       under the same terms as Perl itself.
665

AUTHORS / ACKNOWLEDGMENTS

667       This module is based on the "URI::URL" module, which in turn was
668       (distantly) based on the "wwwurl.pl" code in the libwww-perl for perl4
669       developed by Roy Fielding, as part of the Arcadia project at the
670       University of California, Irvine, with contributions from Brooks
671       Cutter.
672
673       "URI::URL" was developed by Gisle Aas, Tim Bunce, Roy Fielding and
674       Martijn Koster with input from other people on the libwww-perl mailing
675       list.
676
677       "URI" and related subclasses was developed by Gisle Aas.
678
679
680
681perl v5.28.1                      2019-01-09                            URI(3)
Impressum