On Tue, 2011-05-31 at 17:29 -0700, Aaron Grewell wrote:
> Should the C-style selector and if/then statements have equivalent
> true/false handling?  Maybe I'm setting this up wrong, but I expected
> these two to be the same:
> 
> if $name[symlink]    { $symlink    = $name[symlink]    } else
> { $symlink    = undef                }
> $symlink    = $name[symlink]    ? { true => $name[symlink],    false
> => undef              }
> 
> Yet they don't return the same result.  The if/then statement sets the
> value to false as expected, whereas the selector never matches at all
> and throws an error.

There shouldn't be any difference, except there is a known issue with
selectors and arrays:
http://projects.puppetlabs.com/issues/5860

Since you're mentioning an error (which you should have included for
further analysis), I'd tend to think you're hitting this issue.

HTH,
-- 
Brice Figureau
Follow the latest Puppet Community evolutions on www.planetpuppet.org!

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" 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-users?hl=en.

Reply via email to