GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
IRI(3) User Contributed Perl Documentation IRI(3)

IRI - Internationalized Resource Identifiers

This document describes IRI version 0.011

  use IRI;
  
  my $i = IRI->new(value => 'https://example.org:80/index#frag');
  say $i->scheme; # 'https'
  say $i->path; # '/index'

  my $base = IRI->new(value => "http://www.hestebedg\x{e5}rd.dk/");
  my $i = IRI->new(value => '#frag', base => $base);
  say $i->abs; # 'http://www.hestebedgård.dk/#frag'

  # Defer parsing of the IRI until necessary
  my $i = IRI->new(value => "http://www.hestebedg\x{e5}rd.dk/", 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 <http://www.ietf.org/rfc/rfc3987.txt> and supports their parsing, serializing, and base resolution.

"lazy"
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.

"as_string"
Returns the absolute IRI string resolved against the base IRI, if present; the relative IRI string otherwise.
"abs"
Returns the absolute IRI string (resolved against the base IRI if present).
"scheme"
"host"
"port"
"user"
"path"
"fragment"
"query"
Returns the respective component of the parsed IRI.
"rel ( $base )"
Returns a new relative IRI object which, when resolved against the $base IRI, is equal to this IRI.
"query_form"
Returns a HASH of key-value mappings for the unencoded, parsed query form data.
"set_query_param ( $key => $value )"
sets the respective query form value and returns a new IRI object.

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

Gregory Todd Williams "<gwilliams@cpan.org>"

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.
2020-02-20 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.