[Catalyst] O?Reilly might yet be interested after all

Fernan Aguero fernan at iib.unsam.edu.ar
Tue Feb 6 14:30:24 GMT 2007


+----[ Daniel McBrearty <danielmcbrearty at gmail.com> (06.Feb.2007 09:35):
|
| it would be great.

Yes, it would!

| I agree, not just DBIx but also TT. The great thing about cat is it's
| flexibility. But as a beginner it can also be the worst thing.

I agree. Not long ago I was a complete beginner, not having
used any templating system before. As for TT, there were two
things I've found annoying or that confounded me. One of
them could be salvaged by just explaining it clearly while
introducing TT: the 'views' are the templates and not what
is inside lib/app/View. 

The other could be more annoying for a beginner: you have to
learn a new set of syntax rules to use TT. Even if there's
already another book about TT, you might want to at least skim
through some simple TT templates.

And the typical beginner question would then follow:
"OK, I see why you need a delimiter/marker ('[% %]') to tell TT which
parts of the template should be processed, but what I just
don't see is why I can't use standard Perl syntax within
these delimiters!

i.e. instead of [% FOREACH item = things %] 
why can't I just say [% foreach $item ( @things )  %]

instead of [% $item->name() %] why do I have to say
[% item.name() %]

instead of [% $item =~ s/^(\w)\w+/$1./ %] why do I have to go
and read the TT manual and/or purhase a book to realize that
I have to write [% item.replace('^(\w)\w+', '$1.') %] ???

|The
| teaching style needs to be something like "look, it's modular, you can
| bolt just about anything you want to onto this once you understand how
| that works, but in the beginning, this is a good starting setup, which
| most people use at least for a while ... "
| 
| cheers
|
+----]

Fernan



More information about the Catalyst mailing list