Bug #460
Use of '::' in class names not accepted everywhere
| Status: | Closed | Start date: | ||
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 0% |
||
| Category: | - | |||
| Target version: | 0.22.1 | |||
| Affected Puppet 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)
History
Updated by Luke Kanies over 5 years ago
- Status changed from 1 to 2
Updated by Luke Kanies over 5 years ago
- Status changed from 2 to Closed
- 7 set to fixed
Fixed in r2126, r2127, and r2128.