summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser/ast/hostclass.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/parser/ast/hostclass.rb')
-rw-r--r--lib/puppet/parser/ast/hostclass.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/puppet/parser/ast/hostclass.rb b/lib/puppet/parser/ast/hostclass.rb
index 503802b93..8290f4ef0 100644
--- a/lib/puppet/parser/ast/hostclass.rb
+++ b/lib/puppet/parser/ast/hostclass.rb
@@ -20,6 +20,10 @@ class Puppet::Parser::AST
return nil
end
+ # Set the class before we do anything else, so that it's set
+ # during the evaluation and can be inspected.
+ scope.setclass(self.object_id, @type)
+
# Default to creating a new context
newcontext = true
if parentscope = self.evalparent(
@@ -45,10 +49,6 @@ class Puppet::Parser::AST
:name => objname,
:newcontext => newcontext
)
-
- # Set the mark after we evaluate, so we don't record it but
- # then encounter an error
- scope.setclass(self.object_id, @type)
return retval
end