Buddy Burden wrote:
Now I have a design question. I have an object, which acts (FTMP) like a Perl pseudohash. Specifically, you can use it like a hashref, or like an arrayref. I use it for storing rows I get back from the database. Consequently, I have lots of arrays of these lying around, which I naturally want to get into templates.
So, now things are working pretty much okay, but I'm worried that I've started down a dangerous path. I'm thinking that I'm going to end up implementing all of the virtual functions of hashes (and maybe even arrays) that TT2 already has built-in all over again. Reinventing not just one wheel here ...
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... Tho I admit I've never used any of them with TT, either. "m /hash/" in CPAN returns all kinds of cool doodads. If nothing else, they might help you fill in the rough edges of your virtual functions and overloaded operators and such.
--mark
_______________________________________________ templates mailing list [EMAIL PROTECTED] http://lists.template-toolkit.org/mailman/listinfo/templates
