17.5 The URI ModuleThe URI module contains functions and modules to specify and convert URIs. (URLs are a type of URI.) There are three URI modules: URL, Escape, and Heuristic. Of primary importance to many LWP applications is the URI::URL class, which creates the objects used by LWP::UserAgent to determine protocols, server locations, and resource names. The URI::Escape module replaces unsafe characters in URL strings with their appropriate escape sequences. URI::Heuristic provides convenience methods for creating proper URLs out of short strings and incomplete addresses. 17.5.1 URI::EscapeThis module escapes or unescapes "unsafe" characters within a URL string. Unsafe characters in URLs are described by RFC 1738. Before you form URI::URL objects and use that class's methods, you should make sure your strings are properly escaped. This module does not create its own objects; it exports the following functions: 17.5.2 URI::URL
This module creates URL objects that store all the elements of a URL.
These objects are used by the
The This method creates a new URI::URL object with the URL given as the first parameter. An optional base URL can be specified as the second parameter and is useful for generating an absolute URL from a relative URL.$url = new URI::URL($url_string [, $base_url]) The following list describes the methods for the URI::URL class:
Copyright © 2001 O'Reilly & Associates. All rights reserved. |
|