',
};
$sbO->render_current($format,3);
$sbO->render_all($format);
$sbO->remove('08');
exit;
DEPENDENCIES
Blog::Simple
EXPORT
None by default.
DESCRIPTION
This is a sub-class of "Blog::Simple", indentical in all but the need
for "XML::XSLT", which an amazingly cheeky ISP - the English company,
TheHostForYou.com - is trying to charge me to install!
So, 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
The rendering mthods "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".
OTHER MODIFICATIONS
The only other things I've changed are:
* The render routines "flock" if not running on Win32.
* The render routines return a reference to a scalar, which is the
formatted HTML.
DOCUMENTATION
The remaining interface is identical to the parent module: see
Blog::Simple.
DISPLAYING A SPECIFIC BLOG
It's not in the original and so I'll not add it here.
Make sure the date is a C output with spaces
turned to underscores (C<_>).
sub render_this_blog { my ($date,$author) = (shift,shift);
local *IN;
my $xmlString;
unless (open IN, $blogger->{blog_base}.$date."_".$author."/blog.xml"){
print "Could not find blog, ",
$blogger->{blog_base}.$date."_".$author,
"
";
return undef;
}
read IN,$xmlString,-s IN;
close IN;
my $html = $blogger->transform ($FORMAT,\$xmlString);
print $$html;
}
SEE ALSO
See Blog::Simple, HTML::TokeParser.
AUTHOR
Lee Goddard (lgoddard -at- cpan -dot- org), based on work by J. A.
Robson,
COPYRIGHT
This module: Copyright (C) Lee Goddard, 2003. All Rights Reserved. Made
available under the same terms as Perl itself.