I've stumbled upon this very annoying bug with the future parser where it's 
replacing undef with empty strings when passed inside a hash to 
create_resources().

test.pp
=========
define test($var = undef) {
  notice inline_template("<%= @name %> is <% if @var %>true<% else 
%>false<% end %> and of type <%= @var.class %>")
}

$config = {
  "from_create_resources" => {
    var => undef
  }
}

create_resources('test', $config)
=========

$ puppet apply ./test.pp
Notice: Scope(Test[from_create_resources]): from_create_resources is false 
and of type NilClass

$ puppet apply --parser future ./test.pp
Notice: Scope(Test[from_create_resources]): from_create_resources is true 
and of type String

Breaks most of my templates since I use <% if @var %> everywhere...

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/f943395e-81a5-48f2-a2d8-c2ebe5ae3ef1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to