Hi,
Please note the results of the following tests.
> root@testagent:/srv/dasz# echo 'warning(defined(undef))' | puppet apply
> Warning: Scope(Class[main]): true
> Notice: Compiled catalog for
testagent.example.org in environment production in 0.06 seconds
> Notice: Finished catalog run in 0.14 seconds
> root@testagent:/srv/dasz# echo 'warning(defined($foo))' | puppet apply
> Warning: Scope(Class[main]): true
> Notice: Compiled catalog for
testagent.example.org in environment production in 0.03 seconds
> Notice: Finished catalog run in 0.14 seconds
> root@testagent:/srv/dasz# echo 'warning(defined(undefined))' | puppet apply
> Warning: Scope(Class[main]): false
> Notice: Compiled catalog for
testagent.example.org in environment production in 0.03 seconds
> Notice: Finished catalog run in 0.14 seconds
> root@testagent:/srv/dasz# echo 'warning(undef)' | puppet apply
> Warning: Scope(Class[main]):
> Notice: Compiled catalog for
testagent.example.org in environment production in 0.02 seconds
> Notice: Finished catalog run in 0.14 seconds
> root@testagent:/srv/dasz# echo 'warning($foo)' | puppet apply
> Warning: Scope(Class[main]):
> Notice: Compiled catalog for
testagent.example.org in environment production in 0.02 seconds
> Notice: Finished catalog run in 0.14 seconds
> root@testagent:/srv/dasz#
> root@testagent:/srv/dasz# echo 'warning(undefined)' | puppet apply
> Warning: Scope(Class[main]): undefined
> Notice: Compiled catalog for
testagent.example.org in environment production in 0.02 seconds
> Notice: Finished catalog run in 0.13 seconds
> root@testagent:/srv/dasz# echo 'warning(defined(File["/blah"]))' | puppet apply
> Warning: Scope(Class[main]): false
> Notice: Compiled catalog for
testagent.example.org in environment production in 0.08 seconds
> Notice: Finished catalog run in 0.14 seconds
> root@testagent:/srv/dasz# echo 'warning(File["/blah"])' | puppet apply
> Warning: Scope(Class[main]): File[/blah]
> Notice: Compiled catalog for
testagent.example.org in environment production in 0.08 seconds
> Notice: Finished catalog run in 0.14 seconds
> root@testagent:/srv/dasz# puppet --version
> 3.4.2
> root@testagent:/srv/dasz#
It's sad, isn't it? At least I learned something today.
Regards, David