summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser/ast/hostclass.rb
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-02-27 07:10:01 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-02-27 07:10:01 +0000
commit37c10d176d8d3b7bb1920bbda66c6f0429b66730 (patch)
tree910d3095d45bf15da564dbd144dfa467452e6a3f /lib/puppet/parser/ast/hostclass.rb
parentc5d8680ba55598491c5798c842e65e4a4df54484 (diff)
downloadpuppet-37c10d176d8d3b7bb1920bbda66c6f0429b66730.tar.gz
puppet-37c10d176d8d3b7bb1920bbda66c6f0429b66730.tar.xz
puppet-37c10d176d8d3b7bb1920bbda66c6f0429b66730.zip
Switching setclass to use object_ids instead of class names, and adding some comments.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@951 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet/parser/ast/hostclass.rb')
-rw-r--r--lib/puppet/parser/ast/hostclass.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/puppet/parser/ast/hostclass.rb b/lib/puppet/parser/ast/hostclass.rb
index a5a228716..d6b323fb7 100644
--- a/lib/puppet/parser/ast/hostclass.rb
+++ b/lib/puppet/parser/ast/hostclass.rb
@@ -7,7 +7,10 @@ class Puppet::Parser::AST
attr_accessor :parentclass
def evaluate(scope,hash,objtype,objname)
- if scope.lookupclass(@name)
+ # Verify that we haven't already been evaluated
+ # FIXME The second subclass won't evaluate the parent class
+ # code at all, and any overrides will throw an error.
+ if scope.lookupclass(self.object_id)
Puppet.debug "%s class already evaluated" % @name
return nil
end
@@ -26,7 +29,7 @@ class Puppet::Parser::AST
# Set the mark after we evaluate, so we don't record it but
# then encounter an error
- scope.setclass(@name)
+ scope.setclass(self.object_id)
return retval
end