On Jul 16, 2008, at 9:49 AM, Daniel Pittman wrote:
>
> Luke Kanies <[EMAIL PROTECTED]> writes:
>>
>>
>> Not quite -- you'd need to recursively do this all the way up the
>> scope chain.  For instance, 'operatingsystem' is set at the top-level
>> scope, so it wouldn't even show up except in the top-level scope.
>>
>> This wouldn't make things fabulously more expensive, but it would  
>> have
>> an impact, and it's why I didn't do things this way to start with.
>
> Mmmm.  So, do you have a strong preference for how this is fixed?
>
> I did a bit more poking around in Ruby and found, sadly, that there
> doesn't seem to be any way to create a module, proc or object that is
> free of the standard bindings.
>
> It also seems impossible to fiddle method visibility on a per-instance
> basis, and prone to trouble to try and do it for the class, so it  
> really
> looks like /something/ has to give. :/
>
> Is your preferred solution just to bind all variables into anonymous
> methods?

Binding variables in anonymous methods has exactly the same problem as  
creating the instance variables -- you need to do so recursively.

Why don't you try the recursive setting of instance variables and see  
how it performs?  It might be sufficient.

-- 
The easiest way to figure the cost of living is to take your income and
add ten percent.
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.com


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to