A 'lil off topic, but why do people use commas (,) as the separator thingi? I can't stand it as it's so hard to read. I'd prefer s/^'|'$//; in that case since /'s aren't used or |'s if |'s aren't used, or #...
Interesting. Mine is fine for the minute. If I wanted something a little more complex, I would go for HTML::Template. Although, it's a great learning exercise!
I don't see where I would want to include files at the moment, or use ifs and buts. I just provide that in the code.
Yeah but if you have "ifs and buts" in your code it isn't flexible for the user so by putting them into the templates like I've allowed with my parser, it is a much more user friendly option.
I can select from mysql and then in my template add:
Yeah, I get what you're saying. Although I'm only doing this for myself, so I tend to find it OK (obviously!).
Just thinking, though. One drawback with your system is when editing a HTML file in a WYSIWYG editor? Surely it screwes up your layout having 3 difference chuncks of HTML for the ifs, elsif, else ?
If you got the Perl to work that out it would be better because it keps your HTML completly clean.
Well if I'm writing a HTML document, and I have three different tables based upon results of if, elsif and else, the 3 tables would show up in my HTMl document and screw up the layout (while editing local templates).
Putting the if, elsif and else and working that out in the perl program does not do this.
If there is one I don't have time to write or something beyond my knowledge then I'll download it, but if I know I can just about manage it myself then I make it :)
Yeah, same here. It's funny that though. I take weeks slaving over writing a moduel myself to just about accomplish what I want to do. I learn a hell of a lot in the process too.
Then I sit back, three clicks later at CPAN I have installed a great module that does everything mine wants to and more and even better and much faster. And I think to msyelf..... grrrrrr..
I guess we should welcome this open-source business and just be prepared to accept other's modules. It's like our bodies rejecting other's tissues or something! It's crazy how many people have slaved hours of work into re-creating the wheel. Why?
Yess, I understand all that. But at the end of the day, you're doing a job. You're trying to achieve something. And if a little trip to CPAN would do everything you needed, then why put yourself through weeks of sleepless nights it?
Always puzzled me this one. I do it,. and thousands of others do it. But the more I read usenet posts these days I notice the tone has changed dramaticaly.
Basicaly, there's a module on CPAN to do just about everything. It would be very rare if you had to write something new because a CPAN module couldn't handle what you're trying to do.
I notice that a large nmumber of posts to usenet these days just gets answered "..go to CPAN. The answers there. The answer is in a module which has been tested, tried, developed and proven to work..." Which is a fair statement. After all, perl hackers have been working sleepless weeks to produce these solid modules, and we go and do it all again.
Kind of like buying a car, then scrapping it all and melting it into metal and building my own. Well, not quite ...