summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-02-07 17:07:15 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-02-07 17:07:15 +0000
commitf1ffc34c0927840beeb21e1e2d864ce14de5d15e (patch)
treeb68a8795301d04393e56e540bb61ba73791a47d2 /lib/puppet/parser
parent6affe220db1248cee8489347dc7d7ac071a534e4 (diff)
downloadpuppet-f1ffc34c0927840beeb21e1e2d864ce14de5d15e.tar.gz
puppet-f1ffc34c0927840beeb21e1e2d864ce14de5d15e.tar.xz
puppet-f1ffc34c0927840beeb21e1e2d864ce14de5d15e.zip
Configuration parameters now require (and have) descriptions, and a set of configuration parameters can be converted to a configuration file, a manifest, or a component. All I have to do now is integrate them into the executables.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@872 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet/parser')
-rw-r--r--lib/puppet/parser/ast.rb6
-rw-r--r--lib/puppet/parser/ast/objectdef.rb2
2 files changed, 5 insertions, 3 deletions
diff --git a/lib/puppet/parser/ast.rb b/lib/puppet/parser/ast.rb
index c8cc74f04..5eb4ebaa2 100644
--- a/lib/puppet/parser/ast.rb
+++ b/lib/puppet/parser/ast.rb
@@ -11,8 +11,10 @@ module Puppet
# Do this so I don't have to type the full path in all of the subclasses
AST = Puppet::Parser::AST
- Puppet.setdefault(:typecheck, true)
- Puppet.setdefault(:paramcheck, true)
+ Puppet.setdefaults("ast",
+ [:typecheck, true, "Whether to validate types during parsing."],
+ [:paramcheck, true, "Whether to validate parameters during parsing."]
+ )
attr_accessor :line, :file, :parent
# Just used for 'tree', which is only used in debugging.
diff --git a/lib/puppet/parser/ast/objectdef.rb b/lib/puppet/parser/ast/objectdef.rb
index dc355be77..8b40bda71 100644
--- a/lib/puppet/parser/ast/objectdef.rb
+++ b/lib/puppet/parser/ast/objectdef.rb
@@ -221,7 +221,7 @@ class Puppet::Parser::AST
rescue => detail
raise Puppet::DevError, detail.to_s
end
- next if pname == "name" # always allow these
+ return if pname == "name" # always allow these
unless type.validattr?(pname)
error = Puppet::ParseError.new(
"Invalid parameter '%s' for type '%s'" %