+x, for some as yet undetermined value of x.

This is a clear and simple solution to the problem *in the current (0.25.x)
code base* and on that basis I'd +1 it with no hesitation.  On the other
hand, it's not clear (to me, at the present moment) how it would map to the
bleeding edge (testing).  At the puppet-language level, I'm thinking about
cases such as:

notice $foo_info
if $var =~ /foo([a-z]+)/ {
        $foo_info = "$1 found after foo."
    } else {
        $foo_info = "there's no foo in $var."
}

The problem is that the ephemeral stack adds another layer of mutability
(or, considering that the existing code isn't exactly well behaved, you
might say that it rubs our noses in an existing but heretofore implicit
layer of mutability).  To resolve the $1 in the string interpolation in the
then-clause when computing the future of $foo_info's value we need more
information than we presently have means of tracking without a hairy and
inelegant proliferation of scope like objects, the vast majority of which
will never be needed.

This is not to say that there isn't a clean mapping, just that I haven't
seen it yet; in general I think the patch is a reasonable solution to the
scoping of ephemerals in 0.25.x, and it's just a matter of watching the
details as we transition.

-- Markus

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