Yes, this works, just a bit unpleasant in terms of readability and maintainability over time.
Thanks, Trevor On Fri, Jan 24, 2014 at 8:57 PM, Henrik Lindberg (JIRA) < [email protected]> wrote: > Henrik > Lindberg<https://tickets.puppetlabs.com/secure/ViewProfile.jspa?name=henrik.lindberg> > *commented* on an issue Re: 'puppet doc' does not correctly > parse hashes with facts on the left hand > side.<https://tickets.puppetlabs.com/browse/PUP-1513> > > FWIW - Puppet Doc does an extremely poor job of parsing using regular > expressions. The documentation generation from puppet source has to be done > a different way. > > Meanwhile, you have to find a work-around. Does the following work for you: > > $tmp = $::fqdn > $foo = { > $tmp => 'bar' > } > > [image: Add Comment] > <https://tickets.puppetlabs.com/browse/PUP-1513#add-comment> Add > Comment<https://tickets.puppetlabs.com/browse/PUP-1513#add-comment> > Puppet <https://tickets.puppetlabs.com/browse/PUP> / [image: > Bug]<https://tickets.puppetlabs.com/browse/PUP-1513> > PUP-1513 <https://tickets.puppetlabs.com/browse/PUP-1513> 'puppet doc' > does not correctly parse hashes with facts on the left hand > side.<https://tickets.puppetlabs.com/browse/PUP-1513> > Parsing the following code block fails with the error: Error: Could not > generate documentation: Syntax error at '::fqdn'; expected '}'. > > {code} > $foo = { > $::fqdn => 'bar' > } > {code} > > This code parses correctly using puppet lint and applies properly in > production. > This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) > [image: > Atlassian logo] > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Bugs" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/puppet-bugs. > For more options, visit https://groups.google.com/groups/opt_out. > -- Trevor Vaughan Vice President, Onyx Point, Inc (410) 541-6699 [email protected] -- This account not approved for unencrypted proprietary information -- -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/groups/opt_out.
