Issue #4428 has been updated by Chad Metcalf.
This bit me today. At a minimum the docs should probably reflect this as it
strikes me as a pretty common case and a non intuitive answer.
A nice to have would be a better error msg.
Could not parse for environment production: Syntax error at
'some::client::params'; expected '}'
Is pretty generic and sends me looking for missing : or , just because its what
I'm used to.
----------------------------------------
Bug #4428: Parameterized classes in namespaces result in strange syntax in nodes
https://projects.puppetlabs.com/issues/4428
Author: Stefan Schimanski
Status: Needs Decision
Priority: Normal
Assignee: Nigel Kersten
Category: parser
Target version:
Affected Puppet version:
Keywords: parameterized classes
namespaces
parser
parameterized_classes
Branch:
Consider a namespace with a parameterized class:
class bla {
class foo {
}
class bar ($x=42) {
notify { "x = $x": }
}
}
To include the nested class into a node one would write:
node default {
include bla::foo
class { bla::bar: x => 42 }
}
which does not work as bla::bar is not a allowed symbol by the parser. You have
to quote it:
node default {
include bla::foo
class { "bla::bar": x => 42 }
}
IMHO, Using the title attribute is very strange with this odd syntax as a
consequence. Why isn't there something like:
include bla::foo { x => 42 }
?
--
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.