IRI(3) Internationalized Resource Identifiers


This document describes IRI version 0.005


use IRI;

my $i = IRI->new(value => '');
say $i->scheme; # 'https'
say $i->path; # '/index'
my $base = IRI->new(value => "http://www.hestebedg\x{e5}");
my $i = IRI->new(value => '#frag', base => $base);
say $i->abs; # 'http://www.hestebedgÄ'
# Defer parsing of the IRI until necessary
my $i = IRI->new(value => "http://www.hestebedg\x{e5}", lazy => 1);
say $i->path; # path is parsed here


The IRI module provides an object representation for Internationalized Resource Identifiers (IRIs) as defined by RFC 3987 <> and supports their parsing, serializing, and base resolution.


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


Returns the absolute IRI string resolved against the base IRI, if present; the relative IRI string otherwise.
Returns the absolute IRI string (resolved against the base IRI if present).
Returns the respective component of the parsed IRI.


Gregory Todd Williams "<[email protected]>"


Copyright (c) 2014 Gregory Todd Williams. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.