diff options
author | Hunter Haugen <hunter@puppetlabs.com> | 2014-12-15 16:11:10 -0800 |
---|---|---|
committer | Hunter Haugen <hunter@puppetlabs.com> | 2015-01-07 16:40:06 -0800 |
commit | 7c8ae311cade65e84df1054779a039ff906e630c (patch) | |
tree | d1d0bec00d7b74f433d72c292bee0f97ac0f3464 /README.markdown | |
parent | 4700f16e8273b3d4a3b1e22b09c44d7ac9f74f3e (diff) |
(MODULES-1473) Deprecate type() function for new parser
The `type()` function will cease to work on the new parser because 'type'
is a reserved keyword. The `type3x()` function may be used to continue
similar functionality, but will be deprecated in favor of the built-in
typing system.
The `type_of()` function has been included to introspect types in the
new parser.
Diffstat (limited to 'README.markdown')
-rw-r--r-- | README.markdown | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/README.markdown b/README.markdown index 689660e..e9a1f4e 100644 --- a/README.markdown +++ b/README.markdown @@ -464,7 +464,12 @@ manifests as a valid password attribute. *Type*: rvalue * `to_bytes`: Converts the argument into bytes, for example 4 kB becomes 4096. Takes a single string value as an argument. *Type*: rvalue -* `type`: Returns the type when passed a variable. Type can be a string, array, hash, float, integer, or boolean. *Type*: rvalue +* `type3x`: Returns a string description of the type when passed a value. Type can be a string, array, hash, float, integer, or boolean. This function will be removed when puppet 3 support is dropped and the new type system may be used. *Type*: rvalue + +* `type_of`: Returns the literal type when passed a value. Requires the new + parser. Useful for comparison of types with `<=` such as in `if + type_of($some_value) <= Array[String] { ... }` (which is equivalent to `if + $some_value =~ Array[String] { ... }`) *Type*: rvalue * `union`: This function returns a union of two arrays. For example, `union(["a","b","c"],["b","c","d"])` returns ["a","b","c","d"]. |