Whilst not entirely awash with various templating modules, CPAN probably does have enough to have covered most people's requirements. I would suggest that you set out what you think are your systems unique selling points, specifically in comparison with the existing toolkits, including but not limited to Template and HTML::Template: you will find a number of articles here that engage the differences between the available modules and their particular benefits.
In the end it might be better, rather than putting yet another templating module on the CPAN, to work with the authors of the templating module you feel is closest to what you have done in order to provide the features you feel are missing.
/J\
(has never felt the need to create a templating system in Perl)
Your absolutly right! Template Toolkit is the best thing ever made and no one will *EVER* make a better one. And since Template Toolkit arrived by virgin birth we know that no *home rolled* templating system will *EVER* be better than it. I'm sure in 60 years I'll still be using Template Toolkit because it's simply the most amazing and powerfull template system ever built by man. Its amazing design means that it will be able to handle any task ever presented to any template system ever for all time!
/me goes to finish working on his plugin to make Template Toolkit order lunch.
What are the odds that someone with the explicit design goal of avoiding any non-core modules will write a templating system half as capable as the Template Toolkit in less than a year?
In my opinion, they're negligable.
That doesn't exactly defend to Anonymous Monks rant. Maybe it is justified and maybe its not. Maybe this guys template system is great, maybe it sucks. To just bash him like that and say that all the systems he had seen in the past, so all the ones he will see in the future will suck too, is just crazy so I felt like having a little laugh. Don't crush new peoples dreams just because you've never seen anyone do what they want to do succesfully. We can dream a little can't we? And realistic dreams arn't near as much fun are they?
i wrote a templating system, too (still in development, but
working pretty well); but it works with HTML::Template files, so one side
of it is not new, which is maybe the reason why i'm still alive.
for creating a new templating mini-language and a new module for it you
have to have enough good reasons to be accepted.
$session = {
data1 => 'test1', # scalar
data2 => ['array0', 'array1'], # array ref
data3 => { # hash ref
data1 => 'test4',
data2 => ['array50', 'array51'],
data3 => {
data_x => 'data2_array_count',
data_y => 2,
}
}
};
data1: [%data1%]
data2:
[%data2:%] [%$_%]
[%:data2%] data3:
[%data3:%] data1: [%$_.data1%]
data2:
[%$_.data2:%] [%$_%]
[%:$_.data2%] data3:
[%$_.data3:%] data_x: [%$_.data_x%] data_y: [%$_.data_y%]
[%:$_data3%] [%:data3%] [%data4:%] There's nothing in this data and the entire block will simply be left out of the output. [%:data4%] Here's a direct reference to a nested key
data2 array count is: [%data3.data3.data_y%]
Since data_x and data_y are unique here's another way to get to them:
[%data3.data3:%] data_x: [%data_x%]
data_y: [%data_y%]
[%:data3.data3%]
And yet another:
[%data3:%] data_x: [%$_.data3.data_x%]
data_y: [%$_.data3.data_y%]
[%:data3%]
I don't know about rites of passage, but IMSHO, you should generally ask yourself a couple of questions before undertaking something like this. 1) Is there a need for it? Is something lacking in Perl and CPAN, that makes this necessary and useful? 2) Is there something that comes close, that you could perhaps work with the original programmer/maintainer/whoever, and add to it?
Reinventing the wheel is fine, if you want to learn how something is done, to see what the issues were in solving the problem. But you're very unlikely to produce, say, a sort routine that will be an improvement on what's already out there. Same thing with templates. They've been around long enough, and have had enough eyes looking for bugs, testing them, etc., that it's not likely you'll come up with anything better. Maybe you would - it could happen. But the odds are against you.
I suggest you think about your own experiences, and times you thought, "If only they had X, it would be so much easier". Then find out if X exists, and if not, make it.
Of course, one of the most interesting parts of the README will be the section describing and illustrating why/how your system is both different from and better than other templating systems. And when it would be advisable to use it and when not.
If after writing the README you still think it's a better system, by all means post it here. Then if the negafabulatorists don't succeed in depressing you about your system, *then* you can do the rest of the work to publish.
Incidentally, how did writing your own allow you to "create an application that didn't rely on additonal modules"? Isn't your code a module?
If licensing is issue, you could probably easily deploy the select group of CPAN modules you want to use as distinct and differently-licensed bundle of software.
See also: A Vision for Easy Web Application Deployment for Perl
perlmonks.org content © perlmonks.org and Anonymous Monk, chromatic, dhoss, eric256, gellyfish, markjugg, perrin, ruzam, shenme, spiritway, tinita
prlmnks.org © 2006 edmund von der burg (eccles & toad)
v 0.03