# File lib/puppet/transaction.rb, line 98
 98:   def eval_children_and_apply_resource(resource, ancestor = nil)
 99:     resource_status(resource).scheduled = true
100: 
101:     # We need to generate first regardless, because the recursive
102:     # actions sometimes change how the top resource is applied.
103:     children = eval_generate(resource)
104: 
105:     if ! children.empty? and resource.depthfirst?
106:       children.each do |child|
107:         # The child will never be skipped when the parent isn't
108:         eval_resource(child, ancestor || resource)
109:       end
110:     end
111: 
112:     # Perform the actual changes
113:     apply(resource, ancestor)
114: 
115:     if ! children.empty? and ! resource.depthfirst?
116:       children.each do |child|
117:         eval_resource(child, ancestor || resource)
118:       end
119:     end
120:   end