NAME
Data::TreeDumper::Renderer::DHTML - Simple DHTML renderer for Data::TreeDumper
SYNOPSIS
# Auto load
print DumpTree($s, 'Tree', RENDERER => 'DHTML') ;
# Manual load
print DumpTree
(
$s
, 'Tree'
, RENDERER => Data::TreeDumper::Renderer::DHTML::GetRenderer("argument")
) ;
DESCRIPTION
Simple DHTML renderer for Data::TreeDumper. Thanks to Stevan Little author of Tree::Simple::View for giving me the idea and providing some code I could snatch.
Thanks to my colleague Staffan Maahlén for being a HTML/CSS freak and pointing a zillion little mistakes in the generated HTML.
CSS style is dumped to $setup->{RENDERER}{STYLE} (a ref to a scalar) if it exists. This allows you to collect all the CSS then output it at the top of the HTML code.
{RENDERER}{NO_STYLE} removes style section generation. This is usefull when you defined you styles by hand.
The output will use class 'data_tree_dumper_dhtml' for <li> and <ul>. The class can be renamed with the help of {RENDERER}{CLASS}. This allows you to dump multiple data structures and display them with a diffrent styles.
Data::TreeDumper outputs the tree lines as ASCII text by default. If {RENDERER}{NO_GLYPH} and RENDERER}{NO_STYLE} are defined, no lines are output and the indentation will be the default <li> style. If you would like to specify a specific style for your tree dump, defined you own CSS and set the appropriate class through {RENDERER}{CLASS.
Bugs
The previous version displayed wrong in IE and Mozilla but right in Konqueror. It now works rather fine in IE and Mozilla but wraps in Konqueror when it doens't in Mozilla!
I'm no web guy so if you want to make this module work in your favorit browser, contribute some code.
I'll hapilly hand this module over to someone who knows what he does :-)
EXPORT
None
AUTHOR
Khemir Nadim ibn Hamouda. <nadim@khemir.net>
Copyright (c) 2003 Nadim Ibn Hamouda el Khemir. All rights
reserved. This program is free software; you can redis-
tribute it and/or modify it under the same terms as Perl
itself.
If you find any value in this module, mail me! All hints, tips, flames and wishes are welcome at <nadim@khemir.net>.
SEE ALSO
Data::TreeDumper.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 223:
Non-ASCII character seen before =encoding in 'Maahlén'. Assuming CP1252