Puppet: System Administration Automated

Support

Ticket #1274 (new defect)

Opened 6 months ago

class names cannot begin with a digit

Reported by: marthag Assigned to: community
Priority: normal Milestone:
Component: language Version: 0.24.4
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Attached Patches: None Complexity: Unknown

Description

While a digit-only class name works, a class name that begins with one or more digits followed by a letter fails:

# cat test.pp
class 1foo {
 notice("test")
}
# puppet test.pp
Could not parse for environment development: Syntax error at 'foo' at /tmp/test.pp:1
# cat test1.pp
class 1 {
 notice("test")
}
# puppet test1.pp
# cat test2.pp
class foo1 {
 notice("test")
}
# puppet test2.pp
# cat test3.pp
class f1oo {
 notice("test")
}
# puppet test3.pp
# cat test4.pp
class 123foo {
 notice("test")
}
# puppet test4.pp
Could not parse for environment development: Syntax error at 'foo' at /tmp/test4.pp:1
#