# File lib/puppet/parser/scope.rb, line 238
238:   def lookupvar(name, usestring = true)
239:     table = ephemeral?(name) ? @ephemeral.last : @symtable
240:     # If the variable is qualified, then find the specified scope and look the variable up there instead.
241:     if name =~ /::/
242:       return lookup_qualified_var(name, usestring)
243:     end
244:     # We can't use "if table[name]" here because the value might be false
245:     if ephemeral_include?(name) or table.include?(name)
246:       if usestring and table[name] == :undef
247:         return ""
248:       else
249:         return table[name]
250:       end
251:     elsif self.parent
252:       return parent.lookupvar(name, usestring)
253:     elsif usestring
254:       return ""
255:     else
256:       return :undefined
257:     end
258:   end