> Now, the reason your call on line 74
>
> call_function('lookup', key, 'Hash', 'hash',{})
>
> fails is that you have to pass in a ruby object for the type, not a
> string representation of the type. There's probably a better way that
> would generate an appropriate object based on the string, but this
> works for this case:
>
> call_function('lookup', key,
> Puppet::Pops::Types::PHashType::DEFAULT, 'hash',{})
>
> That invocation gives the expected error message:
>
> Evaluation Error: Error while evaluating a Function Call, Found
> value has wrong type, expects a Hash value, got StringAwesome, that works! :) I was navigating within the pops subsystem code once into this direction, but it felt a bit too clumsy and I didn't bother to try. Thanks for the help! I agree that there should be a better (and documented! ;) ) way that would generate an appropriate object based on the string and if there isn't there should probably be a user story about it. > I've filed DOCUMENT-703 to correct the docs. > https://tickets.puppetlabs.com/browse/DOCUMENT-703 Cool, thanks! best ~pete -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-dev/59b99d8a-a9f8-954b-c1c7-ad4dac0bbed9%40immerda.ch. For more options, visit https://groups.google.com/d/optout.
signature.asc
Description: OpenPGP digital signature
