We have a bunch of company-standard comments in this code, but we are now being required to move to doc++ as our documentation standard, and so this perl program is designed to rearrange our standard comments into doc++ style comments. It is particularly tricky because we are only supposed to add doc++ comments for public methods but not private or protected, and so the program has to figure out if it is being associated with a public, private or protected method and only insert the doc++ comment if it is public.
To do that, my guess is that he's put together some really interesting data structures, that no doubt I will come across as I dig deeper into this perl program.
Thanks heaps for your help.
regards
David Buddrige.
Nigel Wetters wrote:
On Wed, 2002-10-30 at 07:49, David Buddrige wrote:$TO_sub="$;#"; $TC_sub="$;@";obscure. $; is by default "\034"; thus $TO_sub is "\034#" and $TO_sub is "\034@". I guess your colleague has manually constructing her own multidimensional hashes or arrays using these subscript separators. With a local assignment to $; of one of there separators, you'd be able to access an element as: $foo{$a,$b,$c} which really means: $foo{join($;, $a, $b, $c)} # camel book, 3e, p674 Although this method of emulating multidimensional arrays and hashes hasn't been deprecated, it's probably more readable to use $foo{$a}{$b}{$c} unless there's some *really* good reason to be concatenating keys, such as sorting or storing in DBM files, which still probably aren't good enough reasons to destroy the readability of the code. My guess is that your colleague has used such separators in a persistent store of these data structures. But I could be wrong.
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]