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

NAME

6       IRI - Internationalized Resource Identifiers
7

VERSION

9       This document describes IRI version 0.009
10

SYNOPSIS

12         use IRI;
13
14         my $i = IRI->new(value => 'https://example.org:80/index#frag');
15         say $i->scheme; # 'https'
16         say $i->path; # '/index'
17
18         my $base = IRI->new(value => "http://www.hestebedg\x{e5}rd.dk/");
19         my $i = IRI->new(value => '#frag', base => $base);
20         say $i->abs; # 'http://www.hestebedgård.dk/#frag'
21
22         # Defer parsing of the IRI until necessary
23         my $i = IRI->new(value => "http://www.hestebedg\x{e5}rd.dk/", lazy => 1);
24         say $i->path; # path is parsed here
25

DESCRIPTION

27       The IRI module provides an object representation for Internationalized
28       Resource Identifiers (IRIs) as defined by RFC 3987
29       <http://www.ietf.org/rfc/rfc3987.txt> and supports their parsing,
30       serializing, and base resolution.
31

ATTRIBUTES

33       "lazy"
34           A boolean value indicating whether the IRI should be parsed (and
35           validated) during object construction (false), or parsed only when
36           an IRI component is accessed (true). If no components are ever
37           needed (e.g. an IRI is constructed with a "value" and "value" is
38           the only accessor ever called), no parsing will take place.
39

METHODS

41       "as_string"
42           Returns the absolute IRI string resolved against the base IRI, if
43           present; the relative IRI string otherwise.
44
45       "abs"
46           Returns the absolute IRI string (resolved against the base IRI if
47           present).
48
49       "scheme"
50       "host"
51       "port"
52       "user"
53       "path"
54       "fragment"
55       "query"
56           Returns the respective component of the parsed IRI.
57
58       "query_form"
59           Returns a HASH of key-value mappings for the unencoded, parsed
60           query form data.
61
62       "set_query_param ( $key => $value )"
63           sets the respective query form value and returns a new IRI object.
64

SEE ALSO

66       <http://www.ietf.org/rfc/rfc3987.txt>
67

AUTHOR

69       Gregory Todd Williams  "<gwilliams@cpan.org>"
70
72       Copyright (c) 2014--2018 Gregory Todd Williams. This program is free
73       software; you can redistribute it and/or modify it under the same terms
74       as Perl itself.
75
76
77
78perl v5.30.0                      2019-07-26                            IRI(3)
Impressum