Readie - 6:50 pm on Nov 15, 2011 (gmt 0)
Double posting like a boss ;)
My class that prints stuff can call out each row of a table by line number or if you want to insert comments between the row, by name. When the PrintTagnameTable() function is first called it extracts the entire table into a buffer and explodes the rows into an array, therefore repeated printing of rows is very fast, thus giving the same working functionality without putting tables in separate files.
I do quite like the general logic behind this - it's got me thinking of something along the lines of
My parser can then pick up on the loop / endloop, and look for the variable "SOME_VAR_NAME" in my $vars array - which it will expect to be an associative array something like:
$vars['SOME_VAR_NAME'] = array(
'SUB_VAR_1' => 'a',
'SUB_VAR_2' => 'b'
'SUB_VAR_1' => 'c',
'SUB_VAR_2' => 'd'
'SUB_VAR_1' => 'e',
'SUB_VAR_2' => 'f'
And it'll foreach through that, replacing the block between the !c tags.
Thanks for that thought... :)