From 37c10d176d8d3b7bb1920bbda66c6f0429b66730 Mon Sep 17 00:00:00 2001 From: luke Date: Mon, 27 Feb 2006 07:10:01 +0000 Subject: 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 --- lib/puppet/parser/ast/hostclass.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib/puppet/parser/ast') 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 -- cgit