in reply to Recursive Class:Struct syntax error?
I hope to understand what you really want to achieve here: I have no
experience with that module but skimming *very* rapidly the docs it seems that
you are using a wrong syntax to define the struct members, i.e.: to have
an hash
member you should write bin => '%',
That's my guess at interpreting that error message.
That said, while you could use Class::Struct as data structure to familiarize with it, remember that file systems are essentially tree based data structures and as soon as those folder will contain nested folders, you are going to have problems and struggle hard to correctly record the details of the files you want to save for post-processing.
If you really want to mimics a file-system like data structure, I would recommend using something like Tree-Simple or otherwise deeply nested hash (refs) could also serve you well. In any case you should look at one of the plethora of recursive file system search modules to scan your directories.
|
---|