.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "IRI 3pm" .TH IRI 3pm "2022-08-28" "perl v5.34.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" IRI \- Internationalized Resource Identifiers .SH "VERSION" .IX Header "VERSION" This document describes \s-1IRI\s0 version 0.011 .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use IRI; \& \& my $i = IRI\->new(value => \*(Aqhttps://example.org:80/index#frag\*(Aq); \& say $i\->scheme; # \*(Aqhttps\*(Aq \& say $i\->path; # \*(Aq/index\*(Aq \& \& my $base = IRI\->new(value => "http://www.hestebedg\ex{e5}rd.dk/"); \& my $i = IRI\->new(value => \*(Aq#frag\*(Aq, base => $base); \& say $i\->abs; # \*(Aqhttp://www.hestebedgÄrd.dk/#frag\*(Aq \& \& # Defer parsing of the IRI until necessary \& my $i = IRI\->new(value => "http://www.hestebedg\ex{e5}rd.dk/", lazy => 1); \& say $i\->path; # path is parsed here .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" The \s-1IRI\s0 module provides an object representation for Internationalized Resource Identifiers (IRIs) as defined by \&\s-1RFC 3987\s0 and supports their parsing, serializing, and base resolution. .SH "ATTRIBUTES" .IX Header "ATTRIBUTES" .ie n .IP """lazy""" 4 .el .IP "\f(CWlazy\fR" 4 .IX Item "lazy" A boolean value indicating whether the \s-1IRI\s0 should be parsed (and validated) during object construction (false), or parsed only when an \s-1IRI\s0 component is accessed (true). If no components are ever needed (e.g. an \s-1IRI\s0 is constructed with a \f(CW\*(C`value\*(C'\fR and \f(CW\*(C`value\*(C'\fR is the only accessor ever called), no parsing will take place. .SH "METHODS" .IX Header "METHODS" .ie n .IP """as_string""" 4 .el .IP "\f(CWas_string\fR" 4 .IX Item "as_string" Returns the absolute \s-1IRI\s0 string resolved against the base \s-1IRI,\s0 if present; the relative \s-1IRI\s0 string otherwise. .ie n .IP """abs""" 4 .el .IP "\f(CWabs\fR" 4 .IX Item "abs" Returns the absolute \s-1IRI\s0 string (resolved against the base \s-1IRI\s0 if present). .ie n .IP """scheme""" 4 .el .IP "\f(CWscheme\fR" 4 .IX Item "scheme" .PD 0 .ie n .IP """host""" 4 .el .IP "\f(CWhost\fR" 4 .IX Item "host" .ie n .IP """port""" 4 .el .IP "\f(CWport\fR" 4 .IX Item "port" .ie n .IP """user""" 4 .el .IP "\f(CWuser\fR" 4 .IX Item "user" .ie n .IP """path""" 4 .el .IP "\f(CWpath\fR" 4 .IX Item "path" .ie n .IP """fragment""" 4 .el .IP "\f(CWfragment\fR" 4 .IX Item "fragment" .ie n .IP """query""" 4 .el .IP "\f(CWquery\fR" 4 .IX Item "query" .PD Returns the respective component of the parsed \s-1IRI.\s0 .ie n .IP """rel ( $base )""" 4 .el .IP "\f(CWrel ( $base )\fR" 4 .IX Item "rel ( $base )" Returns a new relative \s-1IRI\s0 object which, when resolved against the \f(CW$base\fR \&\s-1IRI,\s0 is equal to this \s-1IRI.\s0 .ie n .IP """query_form""" 4 .el .IP "\f(CWquery_form\fR" 4 .IX Item "query_form" Returns a \s-1HASH\s0 of key-value mappings for the unencoded, parsed query form data. .ie n .IP """set_query_param ( $key => $value )""" 4 .el .IP "\f(CWset_query_param ( $key => $value )\fR" 4 .IX Item "set_query_param ( $key => $value )" sets the respective query form value and returns a new \s-1IRI\s0 object. .SH "SEE ALSO" .IX Header "SEE ALSO" .SH "AUTHOR" .IX Header "AUTHOR" Gregory Todd Williams \f(CW\*(C`\*(C'\fR .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright (c) 2014\-\-2018 Gregory Todd Williams. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.