Issue #8708 has been updated by Dan Bode.

Status changed from Unreviewed to Merged - Pending Release

<pre>
commit b1beaec2da36aa2312f959b1521137f5df96608f
Author: Dan Bode <[email protected]>
Date:   Fri Jul 29 15:10:13 2011 -0700

    (#8708) Add has_key function
    
    It is difficult to use existance of keys in a hash
    as a boolean condition in Puppet (see #8705)
    
    This function provides a working solution until
    the underlying issue in Puppet can be resolved.
    
    Reviewed-by: Jeff McCune
</pre>

----------------------------------------
Feature #8708: Add method to detect existance of hash keys
https://projects.puppetlabs.com/issues/8708

Author: Dan Bode
Status: Merged - Pending Release
Priority: Normal
Assignee: 
Category: 
Target version: 
Keywords: discovered_task, stdlib
Branch: 
Module: 


It is currently difficult to determine if a hash contains a certain key.

Until #8705 is resolved, we need a method that can take a hash and determine if 
it has a certain key.

I propose that we introduce the method has_key

<pre>
if has_key({}, 'key') {
  # should never get here
}
</pre>


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to