Here is an extract from the data structure in DoxyDocs1.pm, re-formatted for greater readability and with one => re-written as quote + comma (see Comma Operator in perlop):

detailed => { doc => [ { type => 'text', content => 'Add a child to the container ' }, "params", [ { parameters => [ { name => 'child' } ], doc => [ { type => 'text', content => 'is the child element to add' } ] } ] ] },

As you can see, doc is a hash key with a reference to an anonymous array as its value. This array contains 3 elements: a reference to an anonymous hash; the string "params"; and a reference to an anonymous array. As GrandFather says, this is syntactically OK, but it is almost certainly not what was intended — which is why you’re unable to extract the data you want. You will need to re-consider the way this data structure is generated.

Update: Using prototypes on subroutines is usually a bad idea, unless you have a strong reason to. Better to remove the trailing parentheses from the definition of sub GenerateClassInfo; then call it without the & prefix.

HTH,

Athanasius <°(((><contra mundum


In reply to Re: dereferencing multiple hash array structure by Athanasius
in thread dereferencing multiple hash array structure by jccunning

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.