in reply to Re^5: How to allocate a struct?
in thread How to allocate a struct?
Thank you BrowserUk for your suggestion to describe the use-case/the project needs in more detail.
What I want is a tree structure like a directory tree. I'd like to read the text files together with directory-specific configuration files into memory and collect all words marked to be used as search tags (and their aliases). In a second pass all documents are searched again and the tag index is completed. In the third and last pass the web site consisting of the files in the directory tree is built (merging the HTML design templates with the content text files producing html pages, and some generated pages like sitemaps, indexes, galleries and the like).
This is the reason why I'd like to have structs where I can cleanly collect page data, image data, tags and so on.
I could of course use the deprecated BASIC style without any technical problems. But I'd prefer not to use a global array for each and every struct member. Through appropriate naming the code would at least be relatively easy to understand and to modify. But dealing with lots of lists (arrays) of indices to global arrays would be cumbersome. Maybe there indeed exists a "Perl-ish" way to avoid this... but I am still a fresh novice and still need to learn the perlish way of thinking...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: How to allocate a struct?
by BrowserUk (Patriarch) on Oct 28, 2014 at 23:30 UTC | |
|
Re^7: How to allocate a struct?
by Anonymous Monk on Oct 29, 2014 at 13:36 UTC |