On Thu, May 12, 2011 at 07:36, Nigel Kersten <[email protected]> wrote: > On Thu, May 12, 2011 at 5:14 AM, Luke Kanies <[email protected]> wrote: >> On May 11, 2011, at 10:01 PM, Nigel Kersten wrote: >> >>> Is it possible to access the name of the calling class from inside a >>> function? >> >> You should be able to use '@name'... > > Nope. In case I wasn't clear, it's a Puppet function that I'd like to > make decisions based upon the class it's invoked from.
I would normally flinch at this, because it sounds like a design mistake, but this is about using the class that wraps it as an implicit parameter to help do data lookup, right? So, it isn't that it "behaves differently" based on the calling class, but rather that it uses the class name as an implicit context in which to perform exactly the same operations every time, no? Daniel -- ⎋ Puppet Labs Developer – http://puppetlabs.com ✉ Daniel Pittman <[email protected]> ✆ Contact me via gtalk, email, or phone: +1 (877) 575-9775 ♲ Made with 100 percent post-consumer electrons -- 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.
