',
simple_blog => '',
title => ' ',
author => '',
email => ' ',
ts => ' ',
summary => ' ',
content => ' ',
};
$sbO->render_current($format,3);
$sbO->render_all($format);
$sbO->remove('08');
exit;
Please see the *.cgi files included in the tar distribution for examples
of simple use.
DEPENDENCIES
None.
EXPORT
None.
DESCRIPTION
This is a backwards-compatible modification of "Blog::Simple" by JA
Robson , indentical in all but the need for
"XML::XSLT" and Perl 6.1. It also includes an additional method to
render a specific blog.
Instead of "XML::XSLT", this module uses "HTML::TokeParser", of the core
distribution. Naturally formatting is rather restricted, but it can
produce some useful results if you know your way around CSS
(), and is better than a poke
in the eye with a sharp stick.
USAGE
Please read the documentation for Blog::Simple before continuing, but
ignore the documentation for the rendering methods.
The rendering methods "render_current" and "render_all" no longer take a
paramter of an XSLT file, but instead a reference to a hash, the keys of
which are the names of the nodes in a "Blog::Simple" XML file, values
being HTML to wrap around the named node.
Only the opening tags need be supplied: the correct end-tags will
supplied in lower-case.
For an example, please see the SYNOPSIS.
ADDITIONAL METHOD: render_this_blog
Renders to "STDOUT" the nominated blogged.
In addition to the method's object reference, accepts a date and an
author, and a format hash (see above). The date should be in a
"localtime" output with spaces turned to underscores ("_").
On success, returns a reference to the Blog in HTML. On failure returns
"undef", sending a warning to "STDERR" if you have "warnings" on ("-w").
OTHER MODIFICATIONS TO Blog::Simple
The only other things I've changed are:
* All files "flock" if not running on Win32 (cygwin is ignored as I
don't know if it needs it; presumably it does, though).
* The render routines return a reference to a scalar, which is the
formatted HTML.
-item *
"for" loops simplified.
SEE ALSO
See Blog::Simple, HTML::TokeParser.
AUTHOR
Lee Goddard (lgoddard -at- cpan -dot- org), Most of the work already
done by J. A. Robson,
COPYRIGHT
This module: Copyright (C) Lee Goddard, 2003, and J. A. Robson. All
Rights Reserved. Made available under the same terms as Perl itself.
|