Skip to content

Instantly share code, notes, and snippets.

@fujin
Created October 24, 2008 02:49
Show Gist options
  • Select an option

  • Save fujin/19333 to your computer and use it in GitHub Desktop.

Select an option

Save fujin/19333 to your computer and use it in GitHub Desktop.
aj@junglist /tmp$ cat test.pp
#!/usr/bin/env puppet
#$var = ""
$var = [ "a", "b", "c" ]
case $var {
"": {
notify { "empty string": }
}
default: {
notify { "not empty string": }
}
}
aj@junglist /tmp$ ./test.pp
notice: not empty string
aj@junglist /tmp$ cat test.pp
#!/usr/bin/env puppet
$var = ""
#$var = [ "a", "b", "c" ]
case $var {
"": {
notify { "empty string": }
}
default: {
notify { "not empty string": }
}
}
aj@junglist /tmp$ ./test.pp
notice: empty string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment