Perrin wrote:
> On Mon, 2004-06-14 at 16:01, Jason Gottshall wrote:
> > The perl syntax is:
> >
> > $dbh->{LongReadLen} = 10000;
> >
> > which I write in TT as:
> >
> > [% dbh.LongReadLen = 10000 %]
> >
> > which doesn't work.
>
> This might work:
> [% dbh.STORE('LongReadLen', 10000) %]
Indeeed it does. So is dbh really a tied hashref?
> Or you could just use a [% PERL %] section if you have that on.
Yeah, it's on, but I want to minimize the amount of embedded perl,
especially since I want these templates to be as friendly as possible
for my non-programmer page designers.
> I think it would be better to do it before the template though. There
isn't
> usually a reason to have lots of different values for this setting,
and
> this is exactly the kind of thing that doesn't belong in templates.
Normally we try to avoid doing too much low-level database interaction
at the template level, but we've found that TT is great for fast
prototyping of new features and direct access to dbi is very handy. I
definitely want to avoid using this in production as much as possible.
Thanks for the "STORE" hint. That saves me a lot of headaches!
Jason
|