On 22 Apr 2002, Gregory Stark wrote: > a) If param() were change to instead of looping through all of the keys of the > argument to instead loop through all of the required template parameters > and check for them in the hash. This would allow me to implement a FETCH > method that does the necessary logic and database work to fetch just the > pieces that are actually needed in the template. This means the object > wouldn't have to know in advance everything that the template needs and > prepare all of it.
Which would be slow, both in the tied() case and in the average case of calling param() with some fraction of the total available parameter names. > b) If param() were to accept an object for TMPL_LOOPs. It could call the > iterator operator <$object> to retrieve the parameters for each element of > the loop. This means I wouldn't have to fetch all of the elements at the > start and put them in a prebuilt array, This would allow more general > iterators to be used instead of just arrays. Which would also be slow since each loop through would require the equivalent of a subroutine call. Sorry, I'm just far too interested in being faster than the competition... You could, of course, sub-class HTML::Template and build a param wrapper that does what you want. -sam --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
