puppetlabs/puppet — pull request #937 by daniel-pittman (2012-07-16 17:16:58+00:00)
Title: simplify and clarify parser code

This is a long series of fairly trivial commits: I swept through `lib/puppet/parser` and cleaned up the code in there, which hasn't had any general attention for a long time, just focused bug fixes.

There are a couple of substantial changes, eliminating dead code, and eliminating compatibility with 0.24 or earlier agents. (The later couldn't even dream of working since we ditched the XML-RPC code they use to communicate with the master anyhow.)

The rest of it focuses on getting cleaner, clearer code without all the warts from the half decade of work done on these files, and without the lessons learned since getting integrated.

It also focuses on eliminating useless choice - almost all the change over in the tests is related to that, where the scope could be created without an associated compiler, but only to help satisfy the needs of testing. Instead, make those mandatory, and adjust the tests to cope with the real object model.

It also focuses on making it obvious just how often we delegate methods from one object to another, creating a cluster of related objects that all claim to be distinct, but that are really part of each other because they expose the same actions and act on the same data.