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

make Function empty more tolerant

    XMLWordPrintable

Details

    • cocker-cc
    • Enhancement
    • The 'empty' function now accepts Sensitive data types, which is useful if you need to test if a Sensitive variable is not nil and non-empty, such as in an ERB template.
    • Needs Assessment

    Description

      Desired Behavior:

      Function empty() should accept a Parameter of Datatype Sensitive to test, if a Sensitive[String] is empty or not.

      Actual Behavior:

      Function empty() does not accept a Parameter of Datatype Sensitive - in particular of Datatype Sensitive[String].

      Motivation:
      Concearning Sensitive an EPP-File has the great Advantage over an ERB-File, that you easily can throw in Variables of Type Sensitive, and "it just works". This Advantage is ruined in the Moment, in which you have to test a String for Emptyness in your EPP, because...

      if $mystring.empty { ... }
      

      ... crashes with Sensitive.

      Attachments

        Activity

          People

            Unassigned Unassigned
            cocker.cc Cocker
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Zendesk Support