The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Chronicle::URI - A URI subclass that simplifies handling of HTTP URIs

DESCRIPTION

It is advantageous to handle URIs as objects for easier Unicode handling, canonicalization etc.

We ony need HTTP URIs here so we can save some boilerplate by subclassing URI, but some extra methods for unescaping and prepending/appending also come in handy.

This class will convert any string arguments passed to it to Unicode NFC form

METHODS

new

The constructor takes only a single argument that will be assumed to be an http URI, or in our case usually a path fragment thereof.

unescaped

Return the URI or framgemt completely unescaped. That is, the result of URI::as_iri with additionally all the ASCII characters unescaped. This method is supposed to generate a filename from an URI.

path_append

Append its string argument to the path part of the URI.

path_prepend

Prepend its string argument to the path part of the URI.

i_use_hfs

This is a class method that must be called prior to creating any objects that you want to render in a way that will be compatible with serving them from an HFS+ file system. HFS+ converts non-ASCII characters in file names to Unicode NFD form fo URIs have to be composed differently or the corresponding files won't be found later.

LICENSE

This module is free software; you can redistribute it and/or modify it under the terms of either:

a) the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version, or

b) the Perl "Artistic License".

AUTHOR

Matthias Bethke <matthias@towiski.de>