Here's what I'm trying to say:
if defined("foo") -> 'Tell me if a class "foo" exists in my manifest
set somewhere'
if defined(Class["foo"]) -> 'Tell me if the class "foo" has actually
been defined in my compilation'
So, when would I use
if defined("foo")
Without using
if defined(Class["foo"])
As in:
if defined("foo") and if defined(Class["foo"]) { ...do stuff...}
Because, honestly, I don't care if 'foo' is defined in the classes
that I can pull from, I only care if it's defined and I can use it.
0.24.6
Thanks,
Trevor
On Thu, Feb 10, 2011 at 5:03 AM, donavan <[email protected]> wrote:
> On Feb 9, 9:50 pm, Luke Kanies <[email protected]> wrote:
>> On Feb 7, 2011, at 12:56 PM, Trevor Vaughan wrote:
>>
>> > Ok, I'm resurrecting this thread.
>>
>> > Why would I want:
>>
>> > if defined("class") without if defined(Class["class"]) ?
>>
>> > I'm just not seeing the use case.
>>
>> Can you rephrase the question? I can't seem to parse the Puppet from the
>> English.
>
> I believe he means something like:
> What is the use case for being able to use 'defined("class_name")'
> instead of 'defined(Class["class_name"])' ?
>
> Or, should we really be referring to objects by name only instead of
> specifying the type as well?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Developers" 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-dev?hl=en.
>
>
--
Trevor Vaughan
Vice President, Onyx Point, Inc
(410) 541-6699
[email protected]
-- This account not approved for unencrypted proprietary information --
--
You received this message because you are subscribed to the Google Groups
"Puppet Developers" 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-dev?hl=en.