Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-7174

Add a 'call' function to Puppet built-in functions

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: PUP 5.0.0
    • Fix Version/s: PUP 5.0.0
    • Component/s: Functions, Language
    • Labels:
      None
    • Template:
    • Epic Link:
    • Sub-team:
    • Team:
      Agent
    • Story Points:
      1
    • Sprint:
      Agent 2017-06-14
    • Release Notes:
      New Feature
    • Release Notes Summary:
      The function {{call(name, args...)}} has been added to allow calling a function by name.
    • QA Risk Assessment:
      No Action
    • QA Risk Assessment Reason:
      Check in includes tests for the change

      Description

      The Puppet built-in functions should include a 'call' function, allowing both native Ruby functions and Puppet language functions to be invoked with a variable reference.

      Example:

      $a = 'notice'
      call($a, 'a message')
      

      OR

      function myfunc() { 'result' }
      $a = 'myfunc'
      $b = call($a)
      notice($b)
      

      I'm putting this ticket in per a discussion with Henrik Lindberg in the community Slack.

        Attachments

          Activity

            jsd-sla-details-panel

              People

              • Assignee:
                Unassigned
                Reporter:
                seanmil Sean Millichamp
                QA Contact:
                Eric Delaney
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Zendesk Support