NAME
Formatter::HTML::Preformatted - Absolute minimal HTML formatting of pure text
SYNOPSIS
use Formatter::HTML::Preformatted;
my $formatter = Formatter::HTML::Preformatted->new;
$formatter->format($data);
DESCRIPTION
This module will simply take any text-string and put it in a HTML pre
element. It will escape tags and entities. It will also look through it to see if there are any URIs, and they will be turned into hyperlinks.
METHODS
This module conforms with the Formatter API:
new
-
The constructor, nothing special.
format($string)
-
The format function that you call to get the formatted HTML. It takes the plain text as a string argument and returns a string with HTML.
links($string)
-
Will return all links found the input plain text string as a list.
title
-
This method shall return the title of the document or
undef
if none can be found. Since it doesn't make sense in this context, it will always returnundef
.
SEE ALSO
Formatter::HTML::Textile, URI::Find::Simple
AUTHOR
Kjetil Kjernsmo, <kjetilk@cpan.org>
COPYRIGHT AND LICENSE
Copyright (C) 2004 by Kjetil Kjernsmo
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.4 or, at your option, any later version of Perl 5 you may have available.