ibm1620 has asked for the wisdom of the Perl Monks concerning the following question:
I could use a little help learning Class:Struct. I want to traverse a directory, visiting only certain subdirectories to find files that need to be documented. The directories I want to visit are:
(There will be other sub-subdirectories added later)bin js js/WATS php php/web_crawler
Referring to perldoc for Class:Struct, I tried to create such a tree at compile time:
The compile-time error I receive points to the use line:use Class::Struct DOCUMENTABLE_PATHS => { bin => { }, js => { WATS => { } }, php => { }, scripts => { web_crawler => { } }, };
I'm guessing it doesn't like the way I'm recursing, but I'm stuck.'HASH(0x24a2fd8)' is not a valid struct element type
Maybe this isn't the best way to solve this problem, but I would like to add Class:Struct to my toolbelt. Thanks for any help.
Chap
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Recursive Class:Struct syntax error?
by bliako (Abbot) on Dec 03, 2018 at 16:05 UTC | |
by ibm1620 (Hermit) on Dec 03, 2018 at 18:44 UTC | |
by bliako (Abbot) on Dec 03, 2018 at 20:17 UTC | |
|
Re: Recursive Class:Struct syntax error?
by markong (Pilgrim) on Dec 03, 2018 at 15:49 UTC | |
|
Re: Recursive Class:Struct syntax error?
by ikegami (Patriarch) on Dec 03, 2018 at 18:02 UTC | |
|
Re: Recursive Class:Struct syntax error?
by 1nickt (Canon) on Dec 04, 2018 at 01:46 UTC | |
|
Re: Recursive Class:Struct syntax error?
by ibm1620 (Hermit) on Dec 03, 2018 at 19:18 UTC | |
by markong (Pilgrim) on Dec 03, 2018 at 23:56 UTC |