# File lib/puppet/parser/ast/leaf.rb, line 119
119:         def match(value)
120:             return @value.match(value) unless value.is_a?(HostName)
121: 
122:             if value.regex? and self.regex?
123:                 # Wow this is some sweet design; maybe a touch of refactoring
124:                 # in order here.
125:                 return value.value.value == self.value.value
126:             elsif value.regex? # we know if the existing name is not a regex, it won't match a regex
127:                 return false
128:             else
129:                 # else, we could be either a regex or normal and it doesn't matter
130:                 return @value.match(value.value)
131:             end
132:         end