Bug #460
Use of '::' in class names not accepted everywhere
| Status: | Closed | Start: | ||
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 0% |
||
| Category: | - | |||
| Target version: | 0.22.1 | |||
| Affected version: | 0.25.4 | Branch: | ||
| Keywords: | ||||
| Votes: | 0 |
Description
It’s possible to create a class with ‘::’ in its name – though using that class is not possible everywhere, and requires quoting the class name in other places. It seems the grammar does not accept @fqname@ in all the places it would need to. Example:
class puppet::base {
exec { echo: command => "/bin/echo yo" }
}
# The use of puppet::base causes a syntax error, even if
# it is in single- or double-quotes
class puppet::sub inherits puppet::base {
exec { sub-echo: command => "/bin/echo sub" }
}
puppet::base { } # Always an error, regardless of quoting
# This works if quoted, because include is a function
include "puppet::base"
I would just remove the ability to have ‘::’ in class names until there is a clearer need and concept of namespace support (e.g., with a way to enter a namespace explicitly, like ‘module base’, and a definition of how variables and components behave wrt namespaces)
Associated revisions
Revision a7bd7863fe67e2441013c8c26bcc112d76650dcd
Partially fixing #460 — fully-qualified class names can be used as parent classes.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2126 980ebf18-57e1-0310-9a29-db15c13687c0
Revision 788a74e80c6af40ca2a0d162c5445a0aa0ba866a
Partially fixing #460, take 2 — fully-qualified definitions can now be used.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2127 980ebf18-57e1-0310-9a29-db15c13687c0
Revision 0a62369718e3299990ef36ad657e22f7032446c9
Partially fixing #460, take 3 — fully-qualified classes can now be included.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2128 980ebf18-57e1-0310-9a29-db15c13687c0
History
Updated by Luke Kanies over 3 years ago
- Status changed from 1 to 2
Updated by Luke Kanies over 3 years ago
- Status changed from 2 to Closed
- 7 set to fixed
Fixed in r2126, r2127, and r2128.