Simon Wilcox wrote:
> I've written a Plugin which provides an easy means to work with a sitemap
> described by an xml file.
Me too. Several times, each time slightly different :-)
> It seems useful to me and it might be useful to others although I'm not
> exactly sure what the performance hit is yet. Before unleashing it on the
> world, I wanted to check the policy on naming. Looking at CPAN it looks
> like I could just go ahead and call it Template::Plugin::XML::Sitemap.
> Anyone see any issues with that ?
Can you post the code and/or a description of the API first? I've got
two different modules of similar names (Template::Plugin::Sitemap and
Template::Sitemap::XML), both of which do similar things (but not quite),
and neither of which does all that it should.
I'm happy to throw these away in favour of your module (yay - one less for
me to maintain!), but it would be good to get a common API agreed first.
Apart from anything else, I've got lots of my own web pages that rely on my
sitemap implementation and I've just written a chapter of a book around it.
As for the name, I've previously inclined towards having sitemap modules
separate from the plugin architecture.
Template::Plugin::Sitemap # a plugin module interfacing to one of...
Template::Sitemap # base sitemap
Template::Sitemap::XML # sitemap with xml storage
Template::Sitemap::DBI # sitemap with dbi storage
Template::Sitemap::PaperTape # sitemap with paper tape storage
Template::Sitemap::SillyPutty # ok, now we're getting very silly
In the case of a sitemap, it's quite likely that you'll want to use
it outside of TT. In that case, it's usually better to implement the
guts in a non-plugin module (say, Template::Sitemap::*) and have the
plugin be a simple TT-centric wrapper around it. It's also conceivable
that other sitemap tools/modules may appear and Template::Sitemap is
then a better place for them to grow into than Template::Plugin::Sitemap.
My most recent half-assed implementation (attached) doesn't both with
this abstraction and uses a quick XML::Simple hack in an all-in-one
plugin to do the job. But it's not very good and really should be
better. Perhaps that's why I never sent it to CPAN - because I always
thought I'd improve on it one day (or better yet, someone would beat me
to it - long live Simon the Sitemap Pumpkin!). Feel free to rip out and
reuse any bits you want.
A
Sitemap.pm
Description: Perl program
|
Try Searching:
servers, voip, java, networking, microsoft ...
|
|
|
|