diff options
author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-05-09 05:50:34 +0000 |
---|---|---|
committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-05-09 05:50:34 +0000 |
commit | 513b87a86e9b77bb9f1b011aa55222ce9cfb3a8d (patch) | |
tree | eee376e11f0d3ec84972548af2ab804c7c062bfe /lib/puppet/parser/functions.rb | |
parent | fe16f83a1b56f5d8644ee08585cc3086d4acc2a0 (diff) | |
download | puppet-513b87a86e9b77bb9f1b011aa55222ce9cfb3a8d.tar.gz puppet-513b87a86e9b77bb9f1b011aa55222ce9cfb3a8d.tar.xz puppet-513b87a86e9b77bb9f1b011aa55222ce9cfb3a8d.zip |
Preliminary commit of the first phase of the parser redesign. The biggest difference is that overrides should now work for definitions (although i do not yet have a test case -- i will add one on the next commit). The way this is implemented is by having scopes translate themselves at eval time, but in two phases -- the first phase does the overrides, and the second phase does the evaluation of definitions and classes.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1180 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet/parser/functions.rb')
-rw-r--r-- | lib/puppet/parser/functions.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/puppet/parser/functions.rb b/lib/puppet/parser/functions.rb index 63201924b..b60d94b0a 100644 --- a/lib/puppet/parser/functions.rb +++ b/lib/puppet/parser/functions.rb @@ -27,7 +27,6 @@ module Functions fname = "function_" + name.to_s Puppet::Parser::Scope.send(:define_method, fname, &block) - #FCollection.send(:module_function,name) # Someday we'll support specifying an arity, but for now, nope #@functions[name] = {:arity => arity, :type => ftype} @@ -63,10 +62,11 @@ module Functions newfunction(:include) do |vals| vals.each do |val| if objecttype = lookuptype(val) - # It's a defined type - objecttype.safeevaluate( + # It's a defined type, so set it into the scope so it can + # be evaluated. + setobject( :type => val, - :scope => self + :arguments => {} ) else raise Puppet::ParseError, "Unknown class %s" % val |