RE: [Templates] Design question

[prev] [thread] [next] [Date index for 2004/06/28]

From: Bruce McKenzie
Subject: RE: [Templates] Design question
Date: 20:46 on 28 Jun 2004
The Perl module Data::Table on CPAN interfaces nicely with databases and
with TT2. The tables Data::Table returns in response to DB queries can be
accessed and manipulated as arrays of rows, arrays of hashrefs, just plain
arrays, etc.

HTH

Bruce


-----Original Message-----
From: templates-admin@xxxxxxxxxxxxxxxx.xxx
[mailto:templates-admin@xxxxxxxxxxxxxxxx.xxx] On Behalf Of Buddy Burden
Sent: Monday, June 28, 2004 4:21 PM
To: templates@xxxxxxxxxxxxxxxx.xxx
Subject: Re: [Templates] Design question

Guys,

> You might look at the stuff already on CPAN like Tie::Hash::Array that 
> have already done the work of blending Hash and Array for you... 
> ...  If nothing else, they might help you 
> fill in the rough edges of your virtual functions and overloaded 
> operators and such.

Thanx, but I think my DataRow is already pretty well set.  It works very 
well (and has been for several years now).  It's just when I introduced 
it to TT2 that I encountered some issues.

Besides, any existing CPAN module that implements a solution as an 
object is going to have the exact same problem that I have with DataRow's.

 >  The first thing that comes to my mind is tie (perldoc perltie).

Well, not sure how you mean that ... internally, the object is indeed 
implemented with a tied hash.  Did you mean to suggest that I tie 
another hash to the DataRow itself?  I suppose that would be possible, 
and should work (as long as ref() thinks it's a hash, that's all that 
really matter, I suppose), but it seems a bit clumsy ... double-tying, 
first of all, and secondly it means that all my code has to remember to 
tie all DataRow's back to regular hashes before passing them off to TT2 
... once I go that far, I'd be better off just converting them back to 
"normal" hashes.  Plus I lose the ability to access them as arrays 
(although I fancy I can't really do that via TT2 right now anyway).


		-- Buddy

_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates



_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates

(message missing)

[Templates] Design question
Buddy Burden 18:58 on 28 Jun 2004

Re: [Templates] Design question
Jeff Anderson 19:16 on 28 Jun 2004

Re: [Templates] Design question
Mark Mills 19:16 on 28 Jun 2004

Re: [Templates] Design question
Buddy Burden 20:20 on 28 Jun 2004

RE: [Templates] Design question
Bruce McKenzie 20:46 on 28 Jun 2004

Re: [Templates] Design question
Ken.Olstad 20:55 on 28 Jun 2004

Re: [Templates] Design question
Perrin Harkins 21:25 on 28 Jun 2004

Re: [Templates] Design question
Jeff Anderson 21:47 on 28 Jun 2004

Re: [Templates] Design question
Buddy Burden 16:11 on 01 Jul 2004

Re: [Templates] Design question
Jeff Anderson 18:05 on 01 Jul 2004

Re: [Templates] Design question
Buddy Burden 22:33 on 28 Jun 2004

Re: [Templates] Design question
Perrin Harkins 22:52 on 28 Jun 2004

Re: [Templates] Design question
Buddy Burden 23:18 on 28 Jun 2004

Re: [Templates] Design question
Perrin Harkins 03:21 on 29 Jun 2004

Re: [Templates] Design question
Buddy Burden 16:22 on 29 Jun 2004

Re: [Templates] Design question
Mark Mills 17:09 on 29 Jun 2004

Re: [Templates] Design question
Buddy Burden 17:47 on 29 Jun 2004

[Templates] Design question
Chris Ochs 06:53 on 08 Dec 2004

Generated at 08:55 on 15 Mar 2005 by mariachi v0.52