Hi all,
I wrote a simple collection of HTML/XML widget generator (like tabs,
boxes, paths) using a master class and the subclasses rendering the
particular elements with the same API.
I searched on CPAN and apparently I've not found similar modules,
except CGI::Widget::Tabs (but my implementation differs, and moreover
I can try to intergrate additional graphical tabs feature to this module).
I would put it into an existing namespace like CGI::Widget
or HTML::Widgets.
The problem is where to put the main class without conflict with existent
modules.

I have my files like:

   something/MyWidget.pm
   something/MyWidget/Path.pm
   something/MyWidget/Tabs.pm
   something/MyWidget/Box.pm
   something/MyWidget/Tree.pm
   ...

For example, this is the code using Path widget class
generator:

use MyWidget::Path;
# create new path object
my $path = new MyWidget::Path(
separator => '::',
root => { name => "Home", url => "/" },
base_url => 'http://www.foo.com',
);
$path->addElem( elems => [{ name => "My site", url => "mysite/", append => 1 }] );
print $path->asHTML;


will produce the HTML:
<A HREF="http://www.foo.com/";>Home</A>::<A HREF="http://www.foo.com/mysite/";>My Site</A>


Also a filename path can be passed in order to create an "hyperlinked"
path.

Any suggestions about the module and/or namespace are welcome.

Thanks in advance

- Enrico



Reply via email to