summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser/ast/component.rb
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-05-14 02:42:21 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-05-14 02:42:21 +0000
commitba57dff26b717113a4a7e0bb73bd099a684776e5 (patch)
treec2e701c1135c659e9fc66c900715a717410ca093 /lib/puppet/parser/ast/component.rb
parent22e70f069cec86f94e17774c9c2b84b1bb9cda6c (diff)
downloadpuppet-ba57dff26b717113a4a7e0bb73bd099a684776e5.tar.gz
puppet-ba57dff26b717113a4a7e0bb73bd099a684776e5.tar.xz
puppet-ba57dff26b717113a4a7e0bb73bd099a684776e5.zip
I had to redo how the scopes handled collectable objects (which I will soon change to being called "exported objects"). All seems to work now, though.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1192 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet/parser/ast/component.rb')
-rw-r--r--lib/puppet/parser/ast/component.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/puppet/parser/ast/component.rb b/lib/puppet/parser/ast/component.rb
index 5cf3f5c57..317c8ced5 100644
--- a/lib/puppet/parser/ast/component.rb
+++ b/lib/puppet/parser/ast/component.rb
@@ -10,7 +10,7 @@ class Puppet::Parser::AST
# The class name
@name = :component
- attr_accessor :type, :args, :code, :scope, :keyword
+ attr_accessor :type, :args, :code, :scope, :keyword, :collectable
#def evaluate(scope,hash,objtype,objname)
def evaluate(hash)
@@ -19,6 +19,8 @@ class Puppet::Parser::AST
objname = hash[:name]
arguments = hash[:arguments] || {}
+ @collectable = hash[:collectable]
+
pscope = origscope
#pscope = if ! Puppet[:lexical] or hash[:asparent] == false
# origscope
@@ -32,6 +34,10 @@ class Puppet::Parser::AST
)
newcontext = hash[:newcontext]
+ if @collectable or origscope.collectable
+ scope.collectable = true
+ end
+
unless self.is_a? AST::HostClass and ! newcontext
#scope.warning "Setting context to %s" % self.object_id
scope.context = self.object_id