Re: [Templates] Design question

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

From: Buddy Burden
Subject: Re: [Templates] Design question
Date: 23:18 on 28 Jun 2004
Perrin,

> I don't quite get it.  What's the point of using a tied interface if
> it's private?  The tie functionality is for tricking outside things that
> expect a hash into using your object.

I want something that acts like both a hash and an array.  The easiest 
way (AFAIK, anyway) is to make an object with overloaded hash and array 
dereferencing.  The overloaded array deref just returns the array that 
the data's stored in.  But the overloaded hash deref can't do that, 
because the data's not stored in a hash (and can't be unless I want to 
keep two copies of the data), and also because the hash that a DataRow 
acts like isn't _exactly_ like a Perl hash: for instance, it won't 
autovivify keys, and it won't let you delete keys.  So, in this case, 
the tie functionality isn't being used to fool anyone into thinking it's 
a hash, it's more about having something that _mostly_ acts like a hash, 
but also has some limitations (such as the original pseudohashes, or 
replacements for them such as Tie::Hash::FixedKeys).


		-- Buddy

_______________________________________________
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