Issue #5027 has been updated by Paul Berry.
Here is an example of a .pp file that should produce the warning:
<pre>
$foo = 'foo_value'
class a {
$bar = 'bar_value'
include b
}
class b inherits c {
notify { $baz: } # should not generate a warning -- inherited from class c
notify { $bar: } # should generate a warning -- uses dynamic scoping
notify { $foo: } # should not generate a warning -- comes from top scope
}
class c {
$baz = 'baz_value'
}
include a
</pre>
This should produce three notify messages: "foo_value", "bar_value", and
"baz_value". Only the notify statement for $bar should produce a deprecation
warning.
----------------------------------------
Feature #5027: Issue warnings when using dynamic scope
https://projects.puppetlabs.com/issues/5027
Author: Paul Berry
Status: Accepted
Priority: Normal
Assignee: Paul Berry
Category: language
Target version: Statler
Affected version:
Keywords:
Branch:
This ticket captures a decision made on the developer mailing list on Oct 12
(see email thread "Questions about variable scope").
In Puppet version 2.7, a deprecation warning should be issued whenever a
variable reference takes place or a resource default is applied as a result of
dynamic scoping.
Dynamic scoping means that variables and resource defaults defined in class A
also take effect in classes that A includes. The warning should advise users
that this feature will be removed in a future version of Puppet, so they should
start using other puppet features (such as parameterized classes) to achieve
the desired effect.
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" 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-bugs?hl=en.