in reply to Follow up to RFC: Templating without a System

The thing you have done is one more home-grown templating system. I won't say is it good or bad for YOU. It is your own code and if it fits your needs, it is generally good, because you get your job done.

But if your code will be re-used in future, its modificatition can become a horrible puzzle.

I have worked with a templating system I inherited from a programmer who stopped working on the project before I joined it. It seemed to suite the project well, but in a month I realized that new bugs appeared every time I tried to modify a bit in the templae or related code. I gave up and moved to HTML::Template, which is IMHO the best example of "Templating without a System" already availible in CPAN.

I work in pair with a web designer who creates HTML pages for the project and it was quite simple to teach him the new syntax since I allowed him to use %FOO% variable placeholders instead of messy <TMPL_VAR name="FOO"> ones (HTML::Template has a built-in ability to do such things).

Uph, it's a too long text for my broken English but I hope you understood me. I don't want to say that your idea is bad. But it can BECOME bad in future, if somebody tries to use it for his own job after you stop maintain it :)

Replies are listed 'Best First'.
Re^2: Follow up to RFC: Templating without a System
by shmem (Chancellor) on Jul 01, 2006 at 15:40 UTC
    I would like if you provided me some clue as to how home-grown and not home-grown modules differ.

    Didn't HTML::Template start as something home-grown in the first place? Or was it the perl community that requested the author to write it?

    Or do you differ by perl professionals that write such in their shop compared with random perl hackers writing stuff?

    ...after you stop maintain it
    Erm, first I've got to finish it and see if it makes it's way to CPAN - which I doubt, as for me; there are many people out there that are better in writing such a thing as I myself. But I think it should be done.

    --shmem

    _($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                                  /\_¯/(q    /
    ----------------------------  \__(m.====·.(_("always off the crowd"))."·
    ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
      The only criterion to call the module "not home-grown" is the number of people have chosen it :)

      I'll try to explain my idea.
      Of course modules (in general) are written by random perl hackers ;) And at the start of the way all CPAN modules are home-grown — and your module too, if it becomes availible to CPAN. But then modules that do popular tasks become popular. I'll call it the community proof. When many peole use the code, they definitely find some odds and bugs. Then the author of the module fixes it — or not. In the second case the usage of the module usually stops.

      But if everything is OK, after some cycles of bug finding and fixing the module becomes community-grown. And I prefer community-grown modules to home-grown, of course :)

      I think it's obvious :)

      A reply falls below the community's threshold of quality. You may see it by logging in.