On 2014-03-14 01:19, Henrik Lindberg wrote:
- What is your reaction to getting rid of dynamic/relative name
resolution? (Breakage vs. sanity...)
I totally support that $x can only be a local variable and $foo::x can
only be $::foo::x.
I've been bitten a few times by having a "local" class name shadow a
more global one. E.g: Given there is a "bar" class from the module with
the same name. When adding a local modificator class "foo::bar" in the
"foo" module, the name "bar" suddenly has change meaning throughout
"foo" without any way to notice, except for super-humanly code review
and weird breakage.
I sometimes use very local defines like this:
class foo (...) {
define helper(...) {
# ...
}
helper { $ary: foo => bar }
}
I guess those could still fall under "local" references as long as they
are defined within the braces of the surrounding class. Perhaps external
reference to those should be forbidden anyways ;-)
Regards, David
--
You received this message because you are subscribed to the Google Groups "Puppet
Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-dev/532367CC.10803%40dasz.at.
For more options, visit https://groups.google.com/d/optout.