in reply to Recursive Class:Struct syntax error?
The man page states the valid ways to create such a struct. They all involve an ELEMENT_LIST which has the form NAME => TYPE, ...
Your mistake is that instead of TYPE, you give data. Instead of '*%' you give {}. So, for the non-recursive elements do something like this bin => '*%'
Now, for the recusrive parts. The obvious would be to use a hash-of-hashes - my above suggestion suffices ... But I get the impression you would like to use Class::Struct so that your toolbelt looks tres chic, so to speak. I can't help with that without my mind constantly drifting to either a simple hash-of-hashes-of-hashes-of-hashes... OR creating a class yourself.
bw, bliako
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Recursive Class:Struct syntax error?
by ibm1620 (Hermit) on Dec 03, 2018 at 18:44 UTC | |
by bliako (Abbot) on Dec 03, 2018 at 20:17 UTC |