summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser/scope.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/parser/scope.rb')
-rw-r--r--lib/puppet/parser/scope.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/puppet/parser/scope.rb b/lib/puppet/parser/scope.rb
index 19d79e6d0..991e12302 100644
--- a/lib/puppet/parser/scope.rb
+++ b/lib/puppet/parser/scope.rb
@@ -105,6 +105,11 @@ class Puppet::Parser::Scope
end
end
+ # Remove this when rebasing
+ def environment
+ compiler.environment
+ end
+
# Are we the top scope?
def topscope?
@level == 1
@@ -141,6 +146,8 @@ class Puppet::Parser::Scope
end
}
+ extend_with_functions_module()
+
@tags = []
# The symbol table for this scope. This is where we store variables.
@@ -494,4 +501,10 @@ class Puppet::Parser::Scope
setvar("#{i+1}", m, :file => file, :line => line, :ephemeral => true)
end
end
+
+ private
+
+ def extend_with_functions_module
+ extend Puppet::Parser::Functions.environment_module(compiler ? environment : nil)
+ end
end